Interface GuiModule
public interface GuiModule
A module as the GUI shows it.
-
Method Summary
Modifier and TypeMethodDescriptionaddon()bind()category()editor()booleanid()booleanbooleanbooleanbooleanisListed()booleanisNotify()booleanisShown()kind()label()voidMarks the description as read.module()openPage()voidvoidsetEnabled(boolean enabled) voidsetExpanded(boolean expanded) voidsetHoldBind(boolean hold) voidsetListed(boolean listed) voidsetNotify(boolean notify) settings()voidtoggle()
-
Method Details
-
id
String id()- Returns:
- Module name, stable and used by commands
-
label
String label()- Returns:
- Display title
-
description
String description() -
category
GuiCategory category() -
module
BaseModule module()- Returns:
- The module through the addon API
-
addon
Addon addon()- Returns:
- The addon that added the module, or null for Boze's own modules
-
kind
ModuleKind kind() -
isEnabled
boolean isEnabled() -
setEnabled
void setEnabled(boolean enabled) -
toggle
void toggle() -
bind
Bind bind() -
setBind
-
isHoldBind
boolean isHoldBind()- Returns:
- Whether the module is only on while its bind is held
-
setHoldBind
void setHoldBind(boolean hold) -
isListed
boolean isListed()- Returns:
- Whether the module shows in the HUD's module list
-
setListed
void setListed(boolean listed) -
isNotify
boolean isNotify()- Returns:
- Whether toggling the module shows a notification
-
setNotify
void setNotify(boolean notify) -
isShown
boolean isShown()- Returns:
- Whether the module belongs in the GUI right now: allowed in the client mode and not hidden by its own state
-
isExpanded
boolean isExpanded()- Returns:
- Whether the module's settings are expanded
-
setExpanded
void setExpanded(boolean expanded) -
hasPresets
boolean hasPresets()- Returns:
- Whether the module has saved presets to manage
-
presetsEditor
GuiEditor presetsEditor()- Returns:
- The presets editor, or null when
hasPresets()is false
-
tuneEditor
GuiEditor tuneEditor()- Returns:
- The bind and toggle options editor
-
editor
GuiEditor editor()- Returns:
- The editor of an
ModuleKind.EDITORmodule, otherwise null
-
settings
List<GuiSetting> settings()- Returns:
- Every setting in display order, children right after their parents
-
openPage
PageSetting openPage()- Returns:
- The page whose settings are listed, or null when the module's main settings are
-
markDescriptionSeen
void markDescriptionSeen()Marks the description as read.
-