Class ButtonComponent
java.lang.Object
org.rusherhack.client.api.ui.window.content.WindowContent
org.rusherhack.client.api.ui.window.content.component.ButtonComponent
- All Implemented Interfaces:
org.rusherhack.core.interfaces.IClickable,org.rusherhack.core.interfaces.IHoverable,org.rusherhack.core.interfaces.INamed,org.rusherhack.core.interfaces.IScrollable,org.rusherhack.core.interfaces.ITickable,org.rusherhack.core.interfaces.ITypeable
TODO: create interface so that ComboContent can modify width as needed
-
Field Summary
Fields inherited from class org.rusherhack.client.api.ui.window.content.WindowContent
contextMenu, x, y -
Constructor Summary
ConstructorsConstructorDescriptionButtonComponent(Window window, String label, double width, double height, Runnable clickAction) ButtonComponent(Window window, String label, Runnable clickAction) -
Method Summary
Modifier and TypeMethodDescriptionbooleancharTyped(char character) doublegetName()doublegetWidth()booleanbooleanbooleankeyTyped(int key, int scanCode, int modifiers) booleanmouseClicked(double mouseX, double mouseY, int button) voidmouseReleased(double mouseX, double mouseY, int button) booleanmouseScrolled(double mouseX, double mouseY, double delta) voidonClick()voidrenderContent(double mouseX, double mouseY, WindowView parent) voidvoidsetHeight(double height) voidvoidsetPredicate(Predicate<ButtonComponent> enabledPredicate) voidsetPressed(boolean pressed) voidsetWidth(double width) Methods inherited from class org.rusherhack.client.api.ui.window.content.WindowContent
getContextMenu, getFontRenderer, getRenderer, getWindow, getX, getY, isHovered, setContextMenu, setX, setY, unfocusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.rusherhack.core.interfaces.INamed
getAliases, getDisplayNameMethods inherited from interface org.rusherhack.core.interfaces.ITickable
tick
-
Constructor Details
-
ButtonComponent
-
ButtonComponent
-
-
Method Details
-
renderContent
- Specified by:
renderContentin classWindowContent
-
getWidth
public double getWidth()- Specified by:
getWidthin classWindowContent
-
getHeight
public double getHeight()- Specified by:
getHeightin classWindowContent
-
setWidth
public void setWidth(double width) -
setHeight
public void setHeight(double height) -
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) - Specified by:
mouseClickedin interfaceorg.rusherhack.core.interfaces.IClickable
-
mouseReleased
public void mouseReleased(double mouseX, double mouseY, int button) - Specified by:
mouseReleasedin interfaceorg.rusherhack.core.interfaces.IClickable
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double delta) - Specified by:
mouseScrolledin interfaceorg.rusherhack.core.interfaces.IScrollable
-
charTyped
public boolean charTyped(char character) - Specified by:
charTypedin interfaceorg.rusherhack.core.interfaces.ITypeable
-
keyTyped
public boolean keyTyped(int key, int scanCode, int modifiers) - Specified by:
keyTypedin interfaceorg.rusherhack.core.interfaces.ITypeable
-
getName
- Specified by:
getNamein interfaceorg.rusherhack.core.interfaces.INamed
-
setLabel
-
setAction
-
onClick
public void onClick() -
isPressed
public boolean isPressed() -
setPressed
public void setPressed(boolean pressed) -
setPredicate
-
isEnabled
public boolean isEnabled()
-