Class HudElement
java.lang.Object
org.rusherhack.client.api.ui.ElementBase
org.rusherhack.client.api.ui.ScaledElementBase
org.rusherhack.client.api.feature.hud.HudElement
- All Implemented Interfaces:
- IHudElement,- Globals,- IRenderable2D,- org.rusherhack.core.bind.IBindable,- org.rusherhack.core.event.listener.EventListener,- org.rusherhack.core.feature.IFeature,- org.rusherhack.core.feature.IFeatureConfigurable,- org.rusherhack.core.interfaces.IClickable,- org.rusherhack.core.interfaces.IDraggable,- org.rusherhack.core.interfaces.IHoverable,- org.rusherhack.core.interfaces.INamed,- org.rusherhack.core.interfaces.ITickable,- org.rusherhack.core.interfaces.IToggleable,- org.rusherhack.core.logging.ILoggable,- org.rusherhack.core.serialize.ISerializable<com.google.gson.JsonElement>,- org.rusherhack.core.serialize.JsonSerializable
- Direct Known Subclasses:
- ListHudElement,- ResizeableHudElement,- ShortListHudElement,- TextHudElement
public abstract class HudElement
extends ScaledElementBase
implements IHudElement, org.rusherhack.core.bind.IBindable, org.rusherhack.core.event.listener.EventListener, org.rusherhack.core.logging.ILoggable, Globals
A hud element is a draggable 
ElementBase that can be rendered on the screen.- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumstatic enumPoints at which hud elements are able to "snap" to
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected HudElement.AlignmentAlignment of this hud elementprotected final org.rusherhack.core.logging.ILoggerLogger for this hud element
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic HudElement.AlignmentcalculateAlignment(double x, double y) static HudElement.AlignmentcalculateAlignment(HudElement element) protected voidcorrectPosition(HudElement.Alignment old, HudElement.Alignment newAlignment) booleandeserialize(com.google.gson.JsonElement jsonElement) org.rusherhack.core.logging.ILoggergetName()doublegetScale()List<org.rusherhack.core.setting.Setting<?>>doubledoubledoublegetX()doublegetY()booleanbooleanisHovered(double mouseX, double mouseY) booleanbooleanbooleanmouseClicked(double mouseX, double mouseY, int button) voidmouseMoved(double mouseX, double mouseY) voidmouseReleased(double mouseX, double mouseY, int button) voidvoidonEnable()voidvoidpostRender(RenderContext context, double mouseX, double mouseY) Some stuff shouldn't be rendered in nanovg contextvoidrender(RenderContext context, double mouseX, double mouseY) com.google.gson.JsonElementvoidsetDescription(String description) voidsetSnapPoint(HudElement.SnapPoint snapPoint) voidsetStartX(double x) voidsetStartY(double y) voidsetToggled(boolean toggled) voidsetX(double x) voidsetY(double y) booleanvoidtoggle()Methods inherited from class org.rusherhack.client.api.ui.ScaledElementBasegetScaledHeight, getScaledWidthMethods inherited from class org.rusherhack.client.api.ui.ElementBasegetHeight, getWidthMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.rusherhack.core.feature.IFeatureConfigurablegetSetting, registerSettings, resetMethods inherited from interface org.rusherhack.client.api.feature.hud.IHudElementrenderContent, renderContent, shouldDrawBackgroundMethods inherited from interface org.rusherhack.core.interfaces.INamedgetAliases, getDisplayNameMethods inherited from interface org.rusherhack.client.api.render.IRenderable2DgetRenderer, renderMethods inherited from interface org.rusherhack.core.serialize.ISerializableshouldAutoSave, shouldSerializeMethods inherited from interface org.rusherhack.core.interfaces.ITickabletick
- 
Field Details- 
alignmentAlignment of this hud element
- 
loggerprotected final org.rusherhack.core.logging.ILogger loggerLogger for this hud element
 
- 
- 
Constructor Details- 
HudElement
 
- 
- 
Method Details- 
render- Specified by:
- renderin interface- IRenderable2D
 
- 
correctPosition
- 
postRenderSome stuff shouldn't be rendered in nanovg context
- 
getName- Specified by:
- getNamein interface- org.rusherhack.core.interfaces.INamed
 
- 
getDescription- Specified by:
- getDescriptionin interface- org.rusherhack.core.feature.IFeature
 
- 
setDescription
- 
getSettings- Specified by:
- getSettingsin interface- org.rusherhack.core.feature.IFeatureConfigurable
 
- 
mouseClickedpublic boolean mouseClicked(double mouseX, double mouseY, int button) - Specified by:
- mouseClickedin interface- org.rusherhack.core.interfaces.IClickable
 
- 
mouseReleasedpublic void mouseReleased(double mouseX, double mouseY, int button) - Specified by:
- mouseReleasedin interface- org.rusherhack.core.interfaces.IClickable
 
- 
mouseMovedpublic void mouseMoved(double mouseX, double mouseY) - Specified by:
- mouseMovedin interface- org.rusherhack.core.interfaces.IDraggable
 
- 
isDraggingpublic boolean isDragging()- Specified by:
- isDraggingin interface- org.rusherhack.core.interfaces.IDraggable
 
- 
isHoveredpublic boolean isHovered(double mouseX, double mouseY) - Specified by:
- isHoveredin interface- org.rusherhack.core.interfaces.IHoverable
 
- 
togglepublic void toggle()- Specified by:
- togglein interface- org.rusherhack.core.interfaces.IToggleable
 
- 
onEnablepublic void onEnable()- Specified by:
- onEnablein interface- org.rusherhack.core.interfaces.IToggleable
 
- 
onDisablepublic void onDisable()- Specified by:
- onDisablein interface- org.rusherhack.core.interfaces.IToggleable
 
- 
getBindReference- Specified by:
- getBindReferencein interface- org.rusherhack.core.bind.IBindable
 
- 
onKeybindEventpublic void onKeybindEvent()- Specified by:
- onKeybindEventin interface- org.rusherhack.core.bind.IBindable
 
- 
getLoggerpublic org.rusherhack.core.logging.ILogger getLogger()- Specified by:
- getLoggerin interface- org.rusherhack.core.logging.ILoggable
 
- 
isToggledpublic boolean isToggled()- Specified by:
- isToggledin interface- org.rusherhack.core.interfaces.IToggleable
 
- 
setToggledpublic void setToggled(boolean toggled) - Specified by:
- setToggledin interface- org.rusherhack.core.interfaces.IToggleable
 
- 
isListeningpublic boolean isListening()- Specified by:
- isListeningin interface- org.rusherhack.core.event.listener.EventListener
 
- 
setXpublic void setX(double x) - Overrides:
- setXin class- ElementBase
 
- 
setYpublic void setY(double y) - Overrides:
- setYin class- ElementBase
 
- 
getXpublic double getX()- Overrides:
- getXin class- ElementBase
 
- 
getYpublic double getY()- Overrides:
- getYin class- ElementBase
 
- 
getStartXpublic double getStartX()
- 
getStartYpublic double getStartY()
- 
setStartXpublic void setStartX(double x) 
- 
setStartYpublic void setStartY(double y) 
- 
getScalepublic double getScale()- Overrides:
- getScalein class- ScaledElementBase
- Returns:
- The scale of this element
 
- 
getFontRenderer- Specified by:
- getFontRendererin interface- IRenderable2D
 
- 
getSnapPoint
- 
setSnapPoint
- 
serializepublic com.google.gson.JsonElement serialize()- Specified by:
- serializein interface- org.rusherhack.core.serialize.ISerializable<com.google.gson.JsonElement>
 
- 
deserializepublic boolean deserialize(com.google.gson.JsonElement jsonElement) - Specified by:
- deserializein interface- org.rusherhack.core.serialize.ISerializable<com.google.gson.JsonElement>
 
- 
shouldUpdateAlignmentpublic boolean shouldUpdateAlignment()
- 
getAlignment
- 
calculateAlignment
- 
calculateAlignment
 
-