Class TextOption

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

public class TextOption extends Object implements WidgetCreator
An option to display text.
  • Constructor Details

    • TextOption

      public TextOption(String key, boolean drawLine, int padding)
      Constructor.
      Parameters:
      key - the translation key for the text
      drawLine - whether to draw a line on each side of the text
      padding - the padding between the text and the line
    • TextOption

      public TextOption(String key, boolean drawLine)
      Constructor. Equivalent to TextOption(key, drawLine, 5).
      Parameters:
      key - the translation key for the text
      drawLine - whether to draw a line on each side of the text
    • TextOption

      public TextOption(String key)
      Constructor. Equivalent to TextOption(key, false, 5).
      Parameters:
      key - the translation key for the text
  • 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