Interface GuiSession
public interface GuiSession
An open GUI, from opening until the screen closes.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Asks the GUI to close.editors()voidCloses the GUI now.input()booleanmodel()openBind()voidLoads every config and preset code in the clipboard, like pasting them into the load command.voidSwitches this session to the module GUI.voidSwitches this session to the HUD editor.state()surface()theme()
-
Method Details
-
surface
GuiSurface surface()- Returns:
- What the session is showing
-
theme
GuiTheme theme()- Returns:
- The theme drawing this session
-
model
GuiModel model()- Returns:
- Modules, categories and settings
-
editors
EditorStack editors()- Returns:
- The open editors
-
input
GuiInput input()- Returns:
- Cursor, clipboard, bind capture and drags
-
state
GuiThemeState state()- Returns:
- The active theme's saved state
-
hudEditor
HudEditor hudEditor()- Returns:
- The HUD elements while the HUD editor is open, otherwise null
-
close
void close()Asks the GUI to close. The view'sGuiView.closeRequested()decides whether it runs an exit animation first. -
finishClose
void finishClose()Closes the GUI now. Views call this when their exit animation finishes. -
isClosing
boolean isClosing()- Returns:
- Whether a close was requested and is still animating
-
openBind
Bind openBind()- Returns:
- The bind that opens this GUI
-
pasteConfigCodes
void pasteConfigCodes()Loads every config and preset code in the clipboard, like pasting them into the load command. -
showClickGui
void showClickGui()Switches this session to the module GUI. -
showHudEditor
void showHudEditor()Switches this session to the HUD editor. Needs a world.
-