Interface IThemeButton


public interface IThemeButton
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    The button action.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.client.gui.components.Button
    Gets the root button.
    Gets true if toggled, false if not.
    boolean
    Gets if the button is active, if enabled and toggled
    void
    setDrawButton(boolean drawButton)
    Sets the button to draw or ot.
    void
    setEnabled(boolean enabled)
    Enables or disables the button.
    void
    setLabels(String labelOn, String labelOff)
    Sets the on and off labels
    void
    setStaysOn(boolean staysOn)
    Sets so it cannot be toggled off.
    void
    Sets the toggled to value.
    void
    setTooltip(String... tooltip)
    Sets tooltip.
    void
    Switch the toggle value.
  • Method Details

    • setToggled

      void setToggled(Boolean toggled)
      Sets the toggled to value.
      Parameters:
      toggled - to toggle.
    • getToggled

      Boolean getToggled()
      Gets true if toggled, false if not.
      Returns:
      is toggled.
    • isActive

      boolean isActive()
      Gets if the button is active, if enabled and toggled
      Returns:
      if active.
    • toggle

      void toggle()
      Switch the toggle value.
    • setLabels

      void setLabels(String labelOn, String labelOff)
      Sets the on and off labels
      Parameters:
      labelOn - - The on label.
      labelOff - - The off label.
    • getButton

      net.minecraft.client.gui.components.Button getButton()
      Gets the root button.
      Returns:
      - The root button.
    • setDrawButton

      void setDrawButton(boolean drawButton)
      Sets the button to draw or ot.
      Parameters:
      drawButton - - To draw the button.
    • setStaysOn

      void setStaysOn(boolean staysOn)
      Sets so it cannot be toggled off. Only works for ToggleTheme buttons. When toggled, it cannot be untoggled and becomes unclickable.
      Parameters:
      staysOn - - The stays on.
    • setEnabled

      void setEnabled(boolean enabled)
      Enables or disables the button.
      Parameters:
      enabled - - To enable.
    • setTooltip

      void setTooltip(String... tooltip)
      Sets tooltip. Can be a list of strings or i18n keys.
      Parameters:
      tooltip - the tooltip