Package net.uku3lig.ukulib.config.option
Class ColorOption
java.lang.Object
net.uku3lig.ukulib.config.option.ColorOption
- All Implemented Interfaces:
WidgetCreator
An option to select a color.
-
Constructor Summary
ConstructorsConstructorDescriptionColorOption(String suggestionKey, int initialValue, IntConsumer setter) Constructor.ColorOption(String suggestionKey, int initialValue, IntConsumer setter, boolean allowAlpha) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.gui.widget.ClickableWidgetcreateWidget(int x, int y, int width, int height) Creates the widget.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.uku3lig.ukulib.config.option.WidgetCreator
wide
-
Constructor Details
-
ColorOption
Constructor.- Parameters:
suggestionKey- the translation key for the suggestioninitialValue- the initial valuesetter- the callback to set the valueallowAlpha- whether to allow changing the alpha value
-
ColorOption
Constructor. Equivalent toColorOption(suggestionKey, initialValue, setter, false).- Parameters:
suggestionKey- the translation key for the suggestioninitialValue- the initial valuesetter- the callback to set the value
-
-
Method Details
-
createWidget
public net.minecraft.client.gui.widget.ClickableWidget createWidget(int x, int y, int width, int height) Description copied from interface:WidgetCreatorCreates the widget.- Specified by:
createWidgetin interfaceWidgetCreator- Parameters:
x- The x positiony- The y positionwidth- The widget widthheight- The widget height- Returns:
- The created widget
-