Buttons, Colors and Keybinds
Learn about the button, color and keybind elements that can be used in a config.
Last updated
Learn about the button, color and keybind elements that can be used in a config.
Last updated
The button is a simple interaction that can trigger code when pressed. It's got both single and dual-column variants.
You can create your method to run when the button is pressed using the Runnable interface:
OneConfig also offers keybinds that replace Minecraft's own keybind system. Basically, it's handled and stored by OneConfig, not the game. It's got both single and dual-column variants.
This config component uses OneKeyBind to store the keybinds.
To register an action when a keybind is activated, add the following to your constructor:
The color option lets the user change any default color to their own, using a built-in color picker.
This config component uses OneColor to store the colors.