public class GuiButton extends Gui
Modifier and Type | Field and Description |
---|---|
protected static ResourceLocation |
BUTTON_TEXTURES |
java.lang.String |
displayString |
boolean |
enabled |
int |
height |
protected boolean |
hovered |
int |
id |
int |
packedFGColour |
boolean |
visible |
int |
width |
int |
x |
int |
y |
ICONS, OPTIONS_BACKGROUND, STAT_ICONS, zLevel
Constructor and Description |
---|
GuiButton(int buttonId,
int x,
int y,
int widthIn,
int heightIn,
java.lang.String buttonText) |
GuiButton(int buttonId,
int x,
int y,
java.lang.String buttonText) |
Modifier and Type | Method and Description |
---|---|
void |
drawButton(Minecraft mc,
int mouseX,
int mouseY,
float partialTicks) |
void |
drawButtonForegroundLayer(int mouseX,
int mouseY) |
int |
getButtonWidth() |
protected int |
getHoverState(boolean mouseOver) |
boolean |
isMouseOver() |
protected void |
mouseDragged(Minecraft mc,
int mouseX,
int mouseY) |
boolean |
mousePressed(Minecraft mc,
int mouseX,
int mouseY) |
void |
mouseReleased(int mouseX,
int mouseY) |
void |
playPressSound(SoundHandler soundHandlerIn) |
void |
setWidth(int width) |
drawCenteredString, drawGradientRect, drawHorizontalLine, drawModalRectWithCustomSizedTexture, drawRect, drawScaledCustomSizeModalRect, drawString, drawTexturedModalRect, drawTexturedModalRect, drawTexturedModalRect, drawVerticalLine
protected static final ResourceLocation BUTTON_TEXTURES
public int width
public int height
public int x
public int y
public java.lang.String displayString
public int id
public boolean enabled
public boolean visible
protected boolean hovered
public int packedFGColour
public GuiButton(int buttonId, int x, int y, java.lang.String buttonText)
public GuiButton(int buttonId, int x, int y, int widthIn, int heightIn, java.lang.String buttonText)
protected int getHoverState(boolean mouseOver)
public void drawButton(Minecraft mc, int mouseX, int mouseY, float partialTicks)
protected void mouseDragged(Minecraft mc, int mouseX, int mouseY)
public void mouseReleased(int mouseX, int mouseY)
public boolean mousePressed(Minecraft mc, int mouseX, int mouseY)
public boolean isMouseOver()
public void drawButtonForegroundLayer(int mouseX, int mouseY)
public void playPressSound(SoundHandler soundHandlerIn)
public int getButtonWidth()
public void setWidth(int width)