Package me.hackware.api.hud
Interface HudServices
public interface HudServices
Client services the HUD element bases need but cannot see from the API:
the hud.yml settings store, global HUD layout/scale state, the template
scripting engine, and module lookups. The client installs its
implementation once at startup via
install(me.hackware.api.hud.HudServices); the built-in default
is inert (no persistence, templates echo their input), so an
un-bootstrapped environment stays functional but featureless.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classMutable holder (interfaces cannot own mutable statics). -
Method Summary
Modifier and TypeMethodDescriptionvoidadvanceSelections(String owner) voidapplySettingValue(Setting<?> setting, Object value) Deserializevalueintosetting(config wire format).constantCase(String name) floateffectiveTextScale(HUDElement element) evaluateTemplate(String rawTemplate, boolean censor, String owner) static HudServicesget()The installed implementation (inert untilinstall(me.hackware.api.hud.HudServices)is called).intgetHudSetting(String key, Object defaultValue) intintfloathudSettingKeys(String prefix) All stored keys beginning withprefix.static voidinstall(HudServices services) Installed once by the client before any HUD element is constructed.booleanisModuleEnabled(String name, boolean fallback) Whether the module namednameis enabled;fallbackif unknown.voidremoveHudSetting(String key) resolveExpression(String expr) voidserializeSettingValue(Setting<?> setting) Serializesetting's current value into config wire format.voidsetHudSetting(String key, Object value)
-
Method Details
-
getHudSetting
-
setHudSetting
-
removeHudSetting
-
saveHudSettings
void saveHudSettings() -
hudSettingKeys
All stored keys beginning withprefix. -
applySettingValue
Deserializevalueintosetting(config wire format). -
serializeSettingValue
Serializesetting's current value into config wire format. -
slug
-
constantCase
-
getTextScale
float getTextScale() -
effectiveTextScale
-
getDefaultTextColor
int getDefaultTextColor() -
getSnapDistance
int getSnapDistance() -
getScreenMargin
int getScreenMargin() -
evaluateTemplate
-
resolveExpression
-
advanceSelections
-
isModuleEnabled
Whether the module namednameis enabled;fallbackif unknown. -
get
The installed implementation (inert untilinstall(me.hackware.api.hud.HudServices)is called). -
install
Installed once by the client before any HUD element is constructed.
-