Class HudWidget<C extends HudWidgetConfig>
java.lang.Object
net.lynxclient.api.module.Module<C>
net.lynxclient.api.hud.HudWidget<C>
- Direct Known Subclasses:
TextHudWidget
Something drawn on the HUD that the player can place in the HUD editor. Size and drawing are in GUI pixels
at scale 1; LynxClient handles position, scale and background placement.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longFingerprint ofstateHash(): this widget changes every frame and cannot be cached -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfalse = nothing to show right now (no potion effects, no armour …) – skipped entirely in game, still shown in the editorabstract intheight(RenderContext ctx) abstract voidrender(RenderContext ctx, boolean editor) Draw at (0, 0).longFingerprint of what the widget shows right now (values, pressed keys …).abstract intwidth(RenderContext ctx) Methods inherited from class Module
category, config, dispatchEnabled, id, isEnabled, isSettingVisible, isToggleable, onDisable, onEnableModifier and TypeMethodDescriptionfinal Categorycategory()final Cconfig()final voiddispatchEnabled(boolean enabled) Called by LynxClient – not for addons.final Stringid()Stable id, also the translation prefix and the config file namefinal booleanbooleanisSettingVisible(String key) false hides a setting in the menu, e.g.booleanfalse for modules that are always on (e.g.protected voidAfter the module was switched off.protected voidonEnable()After the module was switched on (also at start-up when it is on).
-
Field Details
-
NOT_CACHEABLE
public static final long NOT_CACHEABLEFingerprint ofstateHash(): this widget changes every frame and cannot be cached- See Also:
-
-
Constructor Details
-
HudWidget
-
-
Method Details
-
hasContent
public boolean hasContent()false = nothing to show right now (no potion effects, no armour …) – skipped entirely in game, still shown in the editor -
stateHash
public long stateHash()Fingerprint of what the widget shows right now (values, pressed keys …). LynxClient may keep the drawn HUD and skip drawing while every fingerprint stays the same. Settings, position and size are covered by LynxClient. Default:NOT_CACHEABLE. -
width
-
height
-
render
Draw at (0, 0). editor = true in the HUD editor (show sample values even outside a world)
-