Class ColorOption

java.lang.Object
net.uku3lig.ukulib.config.option.ColorOption
All Implemented Interfaces:
WidgetCreator

public class ColorOption extends Object implements WidgetCreator
An option to select a color.
  • Constructor Details

    • ColorOption

      public ColorOption(String suggestionKey, int initialValue, IntConsumer setter, boolean allowAlpha)
      Constructor.
      Parameters:
      suggestionKey - the translation key for the suggestion
      initialValue - the initial value
      setter - the callback to set the value
      allowAlpha - whether to allow changing the alpha value
    • ColorOption

      public ColorOption(String suggestionKey, int initialValue, IntConsumer setter)
      Constructor. Equivalent to ColorOption(suggestionKey, initialValue, setter, false).
      Parameters:
      suggestionKey - the translation key for the suggestion
      initialValue - the initial value
      setter - 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: WidgetCreator
      Creates the widget.
      Specified by:
      createWidget in interface WidgetCreator
      Parameters:
      x - The x position
      y - The y position
      width - The widget width
      height - The widget height
      Returns:
      The created widget