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.
  • Method Details

    • getHudSetting

      Object getHudSetting(String key, Object defaultValue)
    • setHudSetting

      void setHudSetting(String key, Object value)
    • removeHudSetting

      void removeHudSetting(String key)
    • saveHudSettings

      void saveHudSettings()
    • hudSettingKeys

      List<String> hudSettingKeys(String prefix)
      All stored keys beginning with prefix.
    • applySettingValue

      void applySettingValue(Setting<?> setting, Object value)
      Deserialize value into setting (config wire format).
    • serializeSettingValue

      Object serializeSettingValue(Setting<?> setting)
      Serialize setting's current value into config wire format.
    • slug

      String slug(String name)
    • constantCase

      String constantCase(String name)
    • getTextScale

      float getTextScale()
    • effectiveTextScale

      float effectiveTextScale(HUDElement element)
    • getDefaultTextColor

      int getDefaultTextColor()
    • getSnapDistance

      int getSnapDistance()
    • getScreenMargin

      int getScreenMargin()
    • evaluateTemplate

      String evaluateTemplate(String rawTemplate, boolean censor, String owner)
    • resolveExpression

      String resolveExpression(String expr)
    • advanceSelections

      void advanceSelections(String owner)
    • isModuleEnabled

      boolean isModuleEnabled(String name, boolean fallback)
      Whether the module named name is enabled; fallback if unknown.
    • get

      static HudServices get()
      The installed implementation (inert until install(me.hackware.api.hud.HudServices) is called).
    • install

      static void install(HudServices services)
      Installed once by the client before any HUD element is constructed.