Package net.minecraft.client.gui
Class GuiButton
- java.lang.Object
-
- net.minecraft.client.gui.Gui
-
- net.minecraft.client.gui.GuiButton
-
- Direct Known Subclasses:
GuiButtonLanguage,GuiListButton,GuiLockIconButton,GuiOptionButton,GuiOptionSlider,GuiSlider
public class GuiButton extends Gui
+ This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Field Summary
Fields Modifier and Type Field Description protected static ResourceLocationbuttonTexturesjava.lang.StringdisplayStringbooleanenabledprotected intheightprotected booleanhoveredintidbooleanvisibleprotected intwidthintxPositionintyPosition-
Fields inherited from class net.minecraft.client.gui.Gui
icons, optionsBackground, statIcons, zLevel
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddrawButton(Minecraft mc, int mouseX, int mouseY)+ Draws this button to the screen.voiddrawButtonForegroundLayer(int mouseX, int mouseY)intgetButtonWidth()protected intgetHoverState(boolean mouseOver)+ 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.booleanisMouseOver()+ Whether the mouse cursor is currently over the button.protected voidmouseDragged(Minecraft mc, int mouseX, int mouseY)+ Fired when the mouse button is dragged.booleanmousePressed(Minecraft mc, int mouseX, int mouseY)+ Returns true if the mouse has been pressed on this control.voidmouseReleased(int mouseX, int mouseY)+ Fired when the mouse button is released.voidplayPressSound(SoundHandler soundHandlerIn)voidsetWidth(int width)-
Methods inherited from class net.minecraft.client.gui.Gui
drawCenteredString, drawGradientRect, drawHorizontalLine, drawModalRectWithCustomSizedTexture, drawRect, drawScaledCustomSizeModalRect, drawString, drawTexturedModalRect, drawTexturedModalRect, drawTexturedModalRect, drawVerticalLine
-
-
-
-
Field Detail
-
buttonTextures
protected static final ResourceLocation buttonTextures
-
width
protected int width
-
height
protected int height
-
xPosition
public int xPosition
-
yPosition
public int yPosition
-
displayString
public java.lang.String displayString
-
id
public int id
-
enabled
public boolean enabled
-
visible
public boolean visible
-
hovered
protected boolean hovered
-
-
Method Detail
-
getHoverState
protected int getHoverState(boolean mouseOver)
+ 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 mc, int mouseX, int mouseY)
+ Draws this button to the screen.
-
mouseDragged
protected void mouseDragged(Minecraft mc, int mouseX, int mouseY)
+ Fired when the mouse button is dragged. Equivalent of MouseListener.mouseDragged(MouseEvent e).
-
mouseReleased
public void mouseReleased(int mouseX, int mouseY)+ Fired when the mouse button is released. Equivalent of MouseListener.mouseReleased(MouseEvent e).
-
mousePressed
public boolean mousePressed(Minecraft mc, int mouseX, int mouseY)
+ Returns true if the mouse has been pressed on this control. Equivalent of MouseListener.mousePressed(MouseEvent e).
-
isMouseOver
public boolean isMouseOver()
+ Whether the mouse cursor is currently over the button.
-
drawButtonForegroundLayer
public void drawButtonForegroundLayer(int mouseX, int mouseY)
-
playPressSound
public void playPressSound(SoundHandler soundHandlerIn)
-
getButtonWidth
public int getButtonWidth()
-
setWidth
public void setWidth(int width)
-
-