public abstract class GuiButton extends Gui implements IGuiEventListener
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 |
packedFGColor |
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 |
drawButtonForegroundLayer(int mouseX,
int mouseY) |
protected int |
getHoverState(boolean mouseOver) |
int |
getWidth() |
boolean |
isMouseOver() |
protected boolean |
isPressable(double mouseX,
double mouseY) |
boolean |
mouseClicked(double p_mouseClicked_1_,
double p_mouseClicked_3_,
int p_mouseClicked_5_) |
boolean |
mouseDragged(double p_mouseDragged_1_,
double p_mouseDragged_3_,
int p_mouseDragged_5_,
double p_mouseDragged_6_,
double p_mouseDragged_8_) |
boolean |
mouseReleased(double p_mouseReleased_1_,
double p_mouseReleased_3_,
int p_mouseReleased_5_) |
void |
onClick(double mouseX,
double mouseY) |
protected void |
onDrag(double mouseX,
double mouseY,
double mouseDX,
double mouseDY) |
void |
onRelease(double mouseX,
double mouseY) |
void |
playPressSound(SoundHandler soundHandlerIn) |
void |
render(int mouseX,
int mouseY,
float partialTicks) |
protected void |
renderBg(Minecraft mc,
int mouseX,
int mouseY) |
void |
setWidth(int width) |
drawCenteredString, drawGradientRect, drawHorizontalLine, drawModalRectWithCustomSizedTexture, drawRect, drawScaledCustomSizeModalRect, drawString, drawTexturedModalRect, drawTexturedModalRect, drawTexturedModalRect, drawVerticalLine
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canFocus, charTyped, focusChanged, keyPressed, keyReleased, mouseScrolled
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 packedFGColor
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 render(int mouseX, int mouseY, float partialTicks)
protected void renderBg(Minecraft mc, int mouseX, int mouseY)
public void onClick(double mouseX, double mouseY)
public void onRelease(double mouseX, double mouseY)
protected void onDrag(double mouseX, double mouseY, double mouseDX, double mouseDY)
public boolean mouseClicked(double p_mouseClicked_1_, double p_mouseClicked_3_, int p_mouseClicked_5_)
mouseClicked
in interface IGuiEventListener
public boolean mouseReleased(double p_mouseReleased_1_, double p_mouseReleased_3_, int p_mouseReleased_5_)
mouseReleased
in interface IGuiEventListener
public boolean mouseDragged(double p_mouseDragged_1_, double p_mouseDragged_3_, int p_mouseDragged_5_, double p_mouseDragged_6_, double p_mouseDragged_8_)
mouseDragged
in interface IGuiEventListener
protected boolean isPressable(double mouseX, double mouseY)
public boolean isMouseOver()
public void drawButtonForegroundLayer(int mouseX, int mouseY)
public void playPressSound(SoundHandler soundHandlerIn)
public int getWidth()
public void setWidth(int width)