Class ToggleButtonWidget

All Implemented Interfaces:
Drawable, Element
Direct Known Subclasses:
RecipeGroupButtonWidget

@Environment(CLIENT)
public class ToggleButtonWidget
extends AbstractButtonWidget
  • Field Details

    • texture

      protected Identifier texture
    • toggled

      protected boolean toggled
    • u

      protected int u
    • v

      protected int v
    • pressedUOffset

      protected int pressedUOffset
    • hoverVOffset

      protected int hoverVOffset
  • Constructor Details

    • ToggleButtonWidget

      public ToggleButtonWidget​(int x, int y, int width, int height, boolean toggled)
  • Method Details

    • setTextureUV

      public void setTextureUV​(int u, int v, int pressedUOffset, int hoverVOffset, Identifier texture)
    • setToggled

      public void setToggled​(boolean toggled)
    • isToggled

      public boolean isToggled()
    • setPos

      public void setPos​(int x, int y)
    • renderButton

      public void renderButton​(MatrixStack matrices, int mouseX, int mouseY, float delta)
      Overrides:
      renderButton in class AbstractButtonWidget