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, getY
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onKeyPress, onMouseDragged
addHelpElements, drawBackground, drawForeground, getDebugInfo, getThisAndChildrenAt, tick
asImmutable, 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, resize
getX, getY
public 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)
IGuiElement
This is called EVEN IF the mouse is not inside your width and height!
addToolTips
in interface IGuiElement
addToolTips
in interface ITooltipElement
public void notifyButtonClicked(int bkey)
notifyButtonClicked
in interface IButtonClickEventTrigger
public void registerListener(IButtonClickEventListener listener)
registerListener
in interface IButtonClickEventTrigger
public void removeListener(IButtonClickEventListener listener)
removeListener
in interface IButtonClickEventTrigger
public boolean isButtonActive()
isButtonActive
in interface IButtonClickEventTrigger
public void onMouseClicked(int button)
IInteractionElement
onMouseClicked
in interface IInteractionElement
public void onMouseReleased(int button)
IInteractionElement
onMouseReleased
in interface IInteractionElement