Class AddonHudModule
java.lang.Object
dev.boze.api.addon.AddonModule
dev.boze.api.addon.AddonHudModule
- All Implemented Interfaces:
BaseModule, Serializable<AddonModule>
Base class for addon HUD modules.
A HUD module supplies its content as a list of
A HUD module supplies its content as a list of
HudLines (each a row of colored
HudText segments). Boze renders the lines as a draggable HUD element
in the Hud category, so addons don't deal with positioning or text layout themselves - just return
what to show. getLines() is called every frame while the module is enabled.-
Nested Class Summary
Nested classes/interfaces inherited from interface BaseModule
BaseModule.BaseModuleArgument -
Field Summary
Fields inherited from class AddonModule
options -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAddonHudModule(String name, String description) Creates a new HUD module. -
Method Summary
Modifier and TypeMethodDescriptiongetLines()Supplies the lines to render, top to bottom.booleanWhether Boze should sort the lines by rendered length, like the ArrayList HUD: longest line toward the nearest top/bottom screen edge.Methods inherited from class AddonModule
fromJson, getArrayListInfo, getBind, getBindOption, getDescription, getName, getOptions, getState, getTitle, isOnlyWhileHolding, isVisible, onDisable, onEnable, setBind, setDescription, setNotify, setOnlyWhileHolding, setState, setTitle, setVisible, shouldNotify, toJson
-
Constructor Details
-
AddonHudModule
-
-
Method Details
-
getLines
-
sortByLength
public boolean sortByLength()Whether Boze should sort the lines by rendered length, like the ArrayList HUD: longest line toward the nearest top/bottom screen edge. Override to return true; defaults to false.- Returns:
- true to sort lines by length
-