Class TextHudWidget
The common "Label value" widget (FPS, Ping, Coordinates, …). Subclasses only provide the texts.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumHow a text widget looks -
Field Summary
Fields inherited from class HudWidget
NOT_CACHEABLEModifier and TypeFieldDescriptionstatic final longFingerprint ofHudWidget.stateHash(): this widget changes every frame and cannot be cached -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTextHudWidget(String id, boolean enabledByDefault, HudWidgetConfig.Anchor anchor, float offsetX, float offsetY) -
Method Summary
Modifier and TypeMethodDescriptionintheight(RenderContext ctx) protected abstract Stringlabel()Short label, e.g.voidrender(RenderContext ctx, boolean editor) Draw at (0, 0).longFingerprint of what the widget shows right now (values, pressed keys …).protected abstract Stringvalue(boolean editor) Current value; editor = true → a sample value is fine when there is no worldintwidth(RenderContext ctx) Methods inherited from class HudWidget
hasContentModifier and TypeMethodDescriptionbooleanfalse = nothing to show right now (no potion effects, no armour …) – skipped entirely in game, still shown in the editorMethods inherited from class Module
category, config, dispatchEnabled, id, isEnabled, isSettingVisible, isToggleable, onDisable, onEnableModifier and TypeMethodDescriptionfinal Categorycategory()final TextHudWidget.Configconfig()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).
-
Constructor Details
-
TextHudWidget
protected TextHudWidget(String id, boolean enabledByDefault, HudWidgetConfig.Anchor anchor, float offsetX, float offsetY)
-
-
Method Details
-
label
Short label, e.g. "FPS" -
value
Current value; editor = true → a sample value is fine when there is no world -
stateHash
public long stateHash()Description copied from class:HudWidgetFingerprint 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:HudWidget.NOT_CACHEABLE.- Overrides:
stateHashin classHudWidget<TextHudWidget.Config>
-
width
- Specified by:
widthin classHudWidget<TextHudWidget.Config>
-
height
- Specified by:
heightin classHudWidget<TextHudWidget.Config>
-
render
Description copied from class:HudWidgetDraw at (0, 0). editor = true in the HUD editor (show sample values even outside a world)- Specified by:
renderin classHudWidget<TextHudWidget.Config>
-