Package net.minecraft.src
Class GuiButton
java.lang.Object
net.minecraft.src.Gui
net.minecraft.src.GuiButton
- Direct Known Subclasses:
GuiButtonLanguage,GuiButtonLink,GuiSlider,GuiSmallButton,LockButton
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ResourceLocationThe string displayed on this control.booleanHides the button completely if false.booleanTrue if this control is enabled, false to disable.protected booleanintButton height in pixelsintID for this control.intButton width in pixelsintThe x position of this control.intThe y position of this control.Fields inherited from class net.minecraft.src.Gui
icons, optionsBackground, statIcons, zLevel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawButton(Minecraft par1Minecraft, int par2, int par3) Draws this button to the screen.voidfunc_82251_b(int par1, int par2) booleanprotected intgetHoverState(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.protected voidmouseDragged(Minecraft par1Minecraft, int par2, int par3) Fired when the mouse button is dragged.booleanmousePressed(Minecraft par1Minecraft, int par2, int par3) Returns true if the mouse has been pressed on this control.voidmouseReleased(int par1, int par2) Fired when the mouse button is released.Methods inherited from class net.minecraft.src.Gui
drawCenteredString, drawGradientRect, drawHorizontalLine, drawRect, drawString, drawTexturedModalRect, drawTexturedModelRectFromIcon, drawVerticalLine
-
Field Details
-
buttonTextures
-
width
public int widthButton width in pixels -
height
public int heightButton height in pixels -
xPosition
public int xPositionThe x position of this control. -
yPosition
public int yPositionThe y position of this control. -
displayString
The string displayed on this control. -
id
public int idID for this control. -
enabled
public boolean enabledTrue if this control is enabled, false to disable. -
drawButton
public boolean drawButtonHides the button completely if false. -
field_82253_i
protected boolean field_82253_i
-
-
Constructor Details
-
GuiButton
-
GuiButton
-
-
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
Draws this button to the screen. -
mouseDragged
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
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)
-