public abstract class GuiAbstractButton extends GuiElementSimple implements IButtonClickEventTrigger, IInteractionElement
| Modifier and Type | Field and Description |
|---|---|
boolean |
active |
boolean |
enabled |
java.lang.String |
id |
boolean |
visible |
gui, name| Constructor and Description |
|---|
GuiAbstractButton(BuildCraftGui gui,
java.lang.String id,
IGuiArea area) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
addToolTips(java.util.List<ToolTip> tooltips)
Called to add tooltips to the list of existing tool tips.
|
GuiElementText |
createTextElement(java.lang.String text) |
GuiElementText |
createTextElement(java.util.function.Supplier<java.lang.String> text) |
void |
deActivate() |
int |
getColourForText() |
protected int |
getHoverState(boolean mouseOver) |
boolean |
isActive() |
boolean |
isButtonActive() |
boolean |
isMouseOver() |
void |
notifyButtonClicked(int bkey) |
void |
onMouseClicked(int button)
This is called EVEN IF the mouse is not inside your width and height!
|
void |
onMouseReleased(int button)
This is called EVEN IF the mouse is not inside your width and height!
|
void |
registerListener(IButtonClickEventListener listener) |
void |
removeListener(IButtonClickEventListener listener) |
void |
setActive(boolean active) |
void |
setBehaviour(IButtonBehaviour behaviour) |
void |
setToolTip(ToolTip tips) |
getDebugInfo, getHeight, getWidth, getX, getYclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonKeyPress, onMouseDraggedaddHelpElements, drawBackground, drawForeground, getDebugInfo, getThisAndChildrenAt, tickasImmutable, contains, contains, contains, create, create, create, expand, expand, expand, expand, getCenter, getCenterTop, getCenterX, getCenterY, getEnd, getEndX, getEndY, getHeight, getPosition, getWidth, offset, offset, offset, offset, offset, offsetToOrigin, rectangleToString, resize, resizegetX, getYpublic final java.lang.String id
public boolean active
public boolean enabled
public boolean visible
public GuiAbstractButton(BuildCraftGui gui, java.lang.String id, IGuiArea area)
public GuiElementText createTextElement(java.lang.String text)
public GuiElementText createTextElement(java.util.function.Supplier<java.lang.String> text)
public int getColourForText()
public boolean isActive()
public final void activate()
public final void deActivate()
public void setActive(boolean active)
public boolean isMouseOver()
protected int getHoverState(boolean mouseOver)
public void setBehaviour(IButtonBehaviour behaviour)
public void setToolTip(ToolTip tips)
public void addToolTips(java.util.List<ToolTip> tooltips)
IGuiElementThis is called EVEN IF the mouse is not inside your width and height!
addToolTips in interface IGuiElementaddToolTips in interface ITooltipElementpublic void notifyButtonClicked(int bkey)
notifyButtonClicked in interface IButtonClickEventTriggerpublic void registerListener(IButtonClickEventListener listener)
registerListener in interface IButtonClickEventTriggerpublic void removeListener(IButtonClickEventListener listener)
removeListener in interface IButtonClickEventTriggerpublic boolean isButtonActive()
isButtonActive in interface IButtonClickEventTriggerpublic void onMouseClicked(int button)
IInteractionElementonMouseClicked in interface IInteractionElementpublic void onMouseReleased(int button)
IInteractionElementonMouseReleased in interface IInteractionElement