public class HUDClickGUI extends ClickGUI implements Toggleable
ClickGUI.LoopFunction| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<FixedComponent> |
allComponents
List of all components.
|
protected boolean |
guiOpen
Whether the GUI components are shown or not.
|
protected java.util.List<FixedComponent> |
hudComponents
List of HUD components.
|
components, descriptionRenderer, inter, permanentComponents| Constructor and Description |
|---|
HUDClickGUI(Interface inter,
DescriptionRenderer descriptionRenderer)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addComponent(FixedComponent component)
Add component to
allComponents instead of the ClickGUI list. |
void |
addHUDComponent(FixedComponent component)
Add component to
allComponents and hudComponents. |
void |
enter()
Handle the GUI being opened.
|
void |
exit()
Handle the GUI being closed.
|
Toggleable |
getComponentToggleable(FixedComponent component)
Get toggleable indicating whether a component is shown or not.
|
void |
hideComponent(FixedComponent component)
Hide a component.
|
boolean |
isOn()
Returns whether GUI is open.
|
void |
showComponent(FixedComponent component)
Add a component to be visible.
|
void |
toggle()
Toggles GUI open state and chooses right components to render.
|
doComponentLoop, getComponents, getContext, handleButton, handleKey, handleScroll, loadConfig, render, saveConfigprotected java.util.List<FixedComponent> allComponents
protected java.util.List<FixedComponent> hudComponents
protected boolean guiOpen
public HUDClickGUI(Interface inter, DescriptionRenderer descriptionRenderer)
inter - the interface for the ClickGUIdescriptionRenderer - the DescriptionRenderer used by the GUIpublic void addComponent(FixedComponent component)
allComponents instead of the ClickGUI list.addComponent in class ClickGUIcomponent - component to be addedpublic void showComponent(FixedComponent component)
PanelManagershowComponent in interface PanelManagershowComponent in class ClickGUIcomponent - the component to be added.public void hideComponent(FixedComponent component)
PanelManagerhideComponent in interface PanelManagerhideComponent in class ClickGUIcomponent - the component to be removed.public void addHUDComponent(FixedComponent component)
allComponents and hudComponents.component - the new HUD componentpublic void toggle()
toggle in interface Toggleablepublic boolean isOn()
isOn in interface Toggleablepublic Toggleable getComponentToggleable(FixedComponent component)
PanelManagergetComponentToggleable in interface PanelManagergetComponentToggleable in class ClickGUIcomponent - the component in question