Class GuiButton

java.lang.Object
net.minecraft.src.Gui
net.minecraft.src.GuiButton
Direct Known Subclasses:
GuiButtonLanguage, GuiButtonLink, GuiSlider, GuiSmallButton, LockButton

public class GuiButton extends Gui
  • Field Details

    • buttonTextures

      protected static final ResourceLocation buttonTextures
    • width

      public int width
      Button width in pixels
    • height

      public int height
      Button height in pixels
    • xPosition

      public int xPosition
      The x position of this control.
    • yPosition

      public int yPosition
      The y position of this control.
    • displayString

      public String displayString
      The string displayed on this control.
    • id

      public int id
      ID for this control.
    • enabled

      public boolean enabled
      True if this control is enabled, false to disable.
    • drawButton

      public boolean drawButton
      Hides the button completely if false.
    • field_82253_i

      protected boolean field_82253_i
  • Constructor Details

    • GuiButton

      public GuiButton(int par1, int par2, int par3, String par4Str)
    • GuiButton

      public GuiButton(int par1, int par2, int par3, int par4, int par5, String par6Str)
  • Method Details

    • getHoverState

      protected int getHoverState(boolean par1)
      Returns 0 if the button is disabled, 1 if the mouse is NOT hovering over this button and 2 if it IS hovering over this button.
    • drawButton

      public void drawButton(Minecraft par1Minecraft, int par2, int par3)
      Draws this button to the screen.
    • mouseDragged

      protected void mouseDragged(Minecraft par1Minecraft, int par2, int par3)
      Fired when the mouse button is dragged. Equivalent of MouseListener.mouseDragged(MouseEvent e).
    • mouseReleased

      public void mouseReleased(int par1, int par2)
      Fired when the mouse button is released. Equivalent of MouseListener.mouseReleased(MouseEvent e).
    • mousePressed

      public boolean mousePressed(Minecraft par1Minecraft, int par2, int par3)
      Returns true if the mouse has been pressed on this control. Equivalent of MouseListener.mousePressed(MouseEvent e).
    • func_82252_a

      public boolean func_82252_a()
    • func_82251_b

      public void func_82251_b(int par1, int par2)