public class ButtonElement extends GuiElement
cropElement, cropHeight, cropWidth, cropX, cropY, height, parent, visible, width, xOffset, xPos, yOffset, yPos| Constructor and Description |
|---|
ButtonElement(int xPos,
int yPos,
Drawable drawable,
java.util.function.Consumer<ButtonElement> onClicked) |
ButtonElement(int xPos,
int yPos,
int width,
int height,
Drawable disabledDrawable,
Drawable enabledDrawable,
java.util.function.Consumer<ButtonElement> onClicked) |
ButtonElement(int xPos,
int yPos,
int width,
int height,
Drawable disabledDrawable,
Drawable enabledDrawable,
Drawable mouseOverDrawable,
java.util.function.Consumer<ButtonElement> onClicked) |
ButtonElement(int xPos,
int yPos,
StandardButtonTextureSets textureSets,
java.util.function.Consumer<ButtonElement> onClicked) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canMouseOver() |
void |
drawElement(int mouseX,
int mouseY)
Draws the element itself at the current position.
|
protected int |
getHoverState(boolean mouseOver) |
boolean |
isEnabled()
The most elements are enabled by default.
|
void |
onPressed() |
void |
setEnabled(boolean enabled) |
addEventHandler, addTooltip, addTooltip, addTooltip, clearTooltip, draw, getAbsoluteX, getAbsoluteY, getAlign, getCropElement, getCropHeight, getCropWidth, getCropX, getCropY, getHeight, getParent, getTooltip, getTooltip, getWidth, getWindow, getX, getY, hasTooltip, hide, isCropped, isMouseOver, isMouseOver, isVisible, onCreation, onDeletion, onUpdateClient, receiveEvent, setAlign, setBounds, setCroppedZone, setHeight, setLocation, setOffset, setParent, setSize, setWidth, setXPosition, setYPosition, show, toString, updateClientdrawCenteredString, drawGradientRect, drawHorizontalLine, drawModalRectWithCustomSizedTexture, drawRect, drawScaledCustomSizeModalRect, drawString, drawTexturedModalRect, drawTexturedModalRect, drawTexturedModalRect, drawVerticalLineclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddEventHandler, addEventHandler, addSelfEventHandler, canFocus, postEvent, postEventpublic ButtonElement(int xPos,
int yPos,
int width,
int height,
Drawable disabledDrawable,
Drawable enabledDrawable,
java.util.function.Consumer<ButtonElement> onClicked)
public ButtonElement(int xPos,
int yPos,
int width,
int height,
Drawable disabledDrawable,
Drawable enabledDrawable,
Drawable mouseOverDrawable,
java.util.function.Consumer<ButtonElement> onClicked)
public ButtonElement(int xPos,
int yPos,
Drawable drawable,
java.util.function.Consumer<ButtonElement> onClicked)
public ButtonElement(int xPos,
int yPos,
StandardButtonTextureSets textureSets,
java.util.function.Consumer<ButtonElement> onClicked)
public void drawElement(int mouseX,
int mouseY)
IGuiElementdrawElement in interface IGuiElementdrawElement in class GuiElementmouseX - The x position of the mouse relative to the parent of the element.mouseY - The y position of the mouse relative to the parent of the element.public boolean canMouseOver()
public boolean isEnabled()
IGuiElementisEnabled in interface IGuiElementisEnabled in class GuiElementpublic void setEnabled(boolean enabled)
protected int getHoverState(boolean mouseOver)
public void onPressed()