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
Modifier and TypeFieldDescriptionprotected double
Window sizeprotected double
Window size -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
charTyped
(char character) boolean
deserialize
(com.google.gson.JsonElement obj) String representation of this bindable objectdouble
@Nullable IGraphic
getIcon()
getName()
abstract WindowView
The root view that should contain all of this window's contentList<org.rusherhack.core.setting.Setting<?>>
double
getWidth()
boolean
boolean
boolean
isHidden()
boolean
isHovered
(double mouseX, double mouseY) boolean
keyTyped
(int key, int scanCode, int modifiers) boolean
mouseClicked
(double mouseX, double mouseY, int button) void
mouseMoved
(double mouseX, double mouseY) void
mouseReleased
(double mouseX, double mouseY, int button) boolean
mouseScrolled
(double mouseX, double mouseY, double delta) void
onClose()
void
boolean
renderIcon
(double x, double y, double width, double height) Renders the icon of this windowboolean
reset()
Resets this window's position and visibilitycom.google.gson.JsonElement
void
setDescription
(String description) void
setDragging
(boolean dragging, double deltaX, double deltaY) void
setFocused
(boolean focused) void
setHidden
(boolean hidden) void
void
tick()
Methods inherited from class org.rusherhack.client.api.ui.ElementBase
getX, getY, setX, setY
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.rusherhack.core.feature.IFeatureConfigurable
getSetting, registerSettings
Methods inherited from interface org.rusherhack.core.interfaces.INamed
getAliases, getDisplayName
Methods 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:
mouseClicked
in interfaceorg.rusherhack.core.interfaces.IClickable
-
mouseReleased
public void mouseReleased(double mouseX, double mouseY, int button) - Specified by:
mouseReleased
in interfaceorg.rusherhack.core.interfaces.IClickable
-
mouseMoved
public void mouseMoved(double mouseX, double mouseY) - Specified by:
mouseMoved
in interfaceorg.rusherhack.core.interfaces.IDraggable
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double delta) - Specified by:
mouseScrolled
in interfaceorg.rusherhack.core.interfaces.IScrollable
-
tick
public void tick()- Specified by:
tick
in interfaceorg.rusherhack.core.interfaces.ITickable
-
charTyped
public boolean charTyped(char character) - Specified by:
charTyped
in interfaceorg.rusherhack.core.interfaces.ITypeable
-
keyTyped
public boolean keyTyped(int key, int scanCode, int modifiers) - Specified by:
keyTyped
in interfaceorg.rusherhack.core.interfaces.ITypeable
-
isHovered
public boolean isHovered(double mouseX, double mouseY) - Specified by:
isHovered
in interfaceorg.rusherhack.core.interfaces.IHoverable
-
getName
- Specified by:
getName
in interfaceorg.rusherhack.core.interfaces.INamed
-
getDescription
- Specified by:
getDescription
in interfaceorg.rusherhack.core.feature.IFeature
-
setDescription
-
getSettings
- Specified by:
getSettings
in interfaceorg.rusherhack.core.feature.IFeatureConfigurable
-
getWidth
public double getWidth()- Specified by:
getWidth
in classElementBase
-
getHeight
public double getHeight()- Specified by:
getHeight
in classElementBase
-
isHidden
public boolean isHidden()- Specified by:
isHidden
in interfaceorg.rusherhack.core.interfaces.IHideable
-
setHidden
public void setHidden(boolean hidden) -
reset
public boolean reset()Resets this window's position and visibility- Specified by:
reset
in interfaceorg.rusherhack.core.feature.IFeature
- Specified by:
reset
in interfaceorg.rusherhack.core.feature.IFeatureConfigurable
- Returns:
- true if the feature was reset
-
getBindReference
String representation of this bindable object- Specified by:
getBindReference
in interfaceorg.rusherhack.core.bind.IBindable
-
onKeybindEvent
public void onKeybindEvent()- Specified by:
onKeybindEvent
in interfaceorg.rusherhack.core.bind.IBindable
-
onClose
public void onClose() -
isDragging
public boolean isDragging()- Specified by:
isDragging
in 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:
serialize
in interfaceorg.rusherhack.core.serialize.ISerializable<com.google.gson.JsonElement>
-
deserialize
public boolean deserialize(com.google.gson.JsonElement obj) - Specified by:
deserialize
in interfaceorg.rusherhack.core.serialize.ISerializable<com.google.gson.JsonElement>
-
getRenderer
-
getFontRenderer
-