Class Window
java.lang.Object
org.rusherhack.client.api.ui.ElementBase
org.rusherhack.client.api.feature.window.Window
- All Implemented Interfaces:
Globals,org.rusherhack.core.bind.IBindable,org.rusherhack.core.feature.IFeature,org.rusherhack.core.feature.IFeatureConfigurable,org.rusherhack.core.interfaces.IClickable,org.rusherhack.core.interfaces.IDraggable,org.rusherhack.core.interfaces.IHideable,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,org.rusherhack.core.serialize.ISerializable<com.google.gson.JsonElement>,org.rusherhack.core.serialize.JsonSerializable
- Direct Known Subclasses:
PinnableWindow,PopupWindow
public abstract class Window
extends ElementBase
implements org.rusherhack.core.feature.IFeatureConfigurable, Globals, org.rusherhack.core.interfaces.IDraggable, org.rusherhack.core.interfaces.IScrollable, org.rusherhack.core.interfaces.ITypeable, org.rusherhack.core.interfaces.ITickable, org.rusherhack.core.interfaces.IHideable, org.rusherhack.core.bind.IBindable, org.rusherhack.core.serialize.JsonSerializable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleWindow sizeprotected doubleWindow size -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancharTyped(char character) booleandeserialize(com.google.gson.JsonElement obj) String representation of this bindable objectdouble@Nullable IGraphicgetIcon()getName()abstract WindowViewThe root view that should contain all of this window's contentList<org.rusherhack.core.setting.Setting<?>>doublegetWidth()booleanbooleanbooleanisHidden()booleanisHovered(double mouseX, double mouseY) booleankeyTyped(int key, int scanCode, int modifiers) booleanmouseClicked(double mouseX, double mouseY, int button) voidmouseMoved(double mouseX, double mouseY) voidmouseReleased(double mouseX, double mouseY, int button) booleanmouseScrolled(double mouseX, double mouseY, double delta) voidonClose()voidbooleanrenderIcon(double x, double y, double width, double height) Renders the icon of this windowbooleanreset()Resets this window's position and visibilitycom.google.gson.JsonElementvoidsetDescription(String description) voidsetDragging(boolean dragging, double deltaX, double deltaY) voidsetFocused(boolean focused) voidsetHidden(boolean hidden) voidvoidtick()Methods inherited from class org.rusherhack.client.api.ui.ElementBase
getX, getY, setX, setYMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.rusherhack.core.feature.IFeatureConfigurable
getSetting, registerSettingsMethods inherited from interface org.rusherhack.core.interfaces.INamed
getAliases, getDisplayNameMethods inherited from interface org.rusherhack.core.serialize.ISerializable
shouldAutoSave, shouldSerialize
-
Field Details
-
width
protected double widthWindow size -
height
protected double heightWindow size
-
-
Constructor Details
-
Window
Constructs a new Window with the specified title and size. The position of the window is set to (100, 100).- Parameters:
title- the title of the windowwidth- the width of the windowheight- the height of the window
-
Window
Constructs a new Window with the specified title, position and size.- Parameters:
title- the title of the windowx- the x-coordinate of the window's positiony- the y-coordinate of the window's positionwidth- the width of the windowheight- the height of the window
-
-
Method Details
-
getRootView
The root view that should contain all of this window's content- Returns:
- the root view of this window
-
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
-
mouseMoved
public void mouseMoved(double mouseX, double mouseY) - Specified by:
mouseMovedin interfaceorg.rusherhack.core.interfaces.IDraggable
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double delta) - Specified by:
mouseScrolledin interfaceorg.rusherhack.core.interfaces.IScrollable
-
tick
public void tick()- Specified by:
tickin interfaceorg.rusherhack.core.interfaces.ITickable
-
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
-
isHovered
public boolean isHovered(double mouseX, double mouseY) - Specified by:
isHoveredin interfaceorg.rusherhack.core.interfaces.IHoverable
-
getName
- Specified by:
getNamein interfaceorg.rusherhack.core.interfaces.INamed
-
getDescription
- Specified by:
getDescriptionin interfaceorg.rusherhack.core.feature.IFeature
-
setDescription
-
getSettings
- Specified by:
getSettingsin interfaceorg.rusherhack.core.feature.IFeatureConfigurable
-
getWidth
public double getWidth()- Specified by:
getWidthin classElementBase
-
getHeight
public double getHeight()- Specified by:
getHeightin classElementBase
-
isHidden
public boolean isHidden()- Specified by:
isHiddenin interfaceorg.rusherhack.core.interfaces.IHideable
-
setHidden
public void setHidden(boolean hidden) -
reset
public boolean reset()Resets this window's position and visibility- Specified by:
resetin interfaceorg.rusherhack.core.feature.IFeature- Specified by:
resetin interfaceorg.rusherhack.core.feature.IFeatureConfigurable- Returns:
- true if the feature was reset
-
getBindReference
String representation of this bindable object- Specified by:
getBindReferencein interfaceorg.rusherhack.core.bind.IBindable
-
onKeybindEvent
public void onKeybindEvent()- Specified by:
onKeybindEventin interfaceorg.rusherhack.core.bind.IBindable
-
onClose
public void onClose() -
isDragging
public boolean isDragging()- Specified by:
isDraggingin interfaceorg.rusherhack.core.interfaces.IDraggable
-
setDragging
public void setDragging(boolean dragging, double deltaX, double deltaY) -
isFocused
public boolean isFocused() -
setFocused
public void setFocused(boolean focused) -
setIcon
-
getIcon
-
renderIcon
public boolean renderIcon(double x, double y, double width, double height) Renders the icon of this window- Returns:
- true if the icon was rendered, false otherwise
-
serialize
public com.google.gson.JsonElement serialize()- Specified by:
serializein interfaceorg.rusherhack.core.serialize.ISerializable<com.google.gson.JsonElement>
-
deserialize
public boolean deserialize(com.google.gson.JsonElement obj) - Specified by:
deserializein interfaceorg.rusherhack.core.serialize.ISerializable<com.google.gson.JsonElement>
-
getRenderer
-
getFontRenderer
-