Package gaiasky.gui
Class GuiRegistry
java.lang.Object
gaiasky.gui.GuiRegistry
- All Implemented Interfaces:
IObserver
Manages the Graphical User Interfaces of Gaia Sky
-
Field Summary
-
Constructor Summary
ConstructorDescriptionGuiRegistry
(com.badlogic.gdx.scenes.scene2d.ui.Skin skin, Scene scene, CatalogManager catalogManager) Create new GUI registry object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProcessor
(IGui gui) Adds the stage of the given GUI to the processors in the input multiplexervoid
Switches the current GUI with the given one, updating the processorsvoid
Switches the current GUI with the given one, updating the processors.void
dispose()
com.badlogic.gdx.InputMultiplexer
void
Event notification call.void
void
registerGui
(IGui gui) Registers a new GUIboolean
boolean
void
removeProcessor
(IGui gui) void
render
(int rw, int rh) Renders the registered GUIsvoid
Sets the given GUI as currentvoid
setInputMultiplexer
(com.badlogic.gdx.InputMultiplexer inputMultiplexer) void
setPrevious
(IGui gui) Sets the given GUI as previousboolean
Unregisters all GUIsboolean
unregisterGui
(IGui gui) Unregisters a GUIvoid
unset()
Unsets the current GUI and sets it as previousvoid
Unsets the given GUI and sets it as previousvoid
update
(double dt) Updates the registered GUIs
-
Field Details
-
modeChangeInfoPopup
public com.badlogic.gdx.scenes.scene2d.ui.Table modeChangeInfoPopupMode change info popup -
scene
Scene reference. -
current
Current GUI object -
previous
Previous GUI object, if any
-
-
Constructor Details
-
GuiRegistry
public GuiRegistry(com.badlogic.gdx.scenes.scene2d.ui.Skin skin, Scene scene, CatalogManager catalogManager) Create new GUI registry object.
-
-
Method Details
-
setInputMultiplexer
public void setInputMultiplexer(com.badlogic.gdx.InputMultiplexer inputMultiplexer) -
getInputMultiplexer
public com.badlogic.gdx.InputMultiplexer getInputMultiplexer() -
change
Switches the current GUI with the given one, updating the processors. It also sets the previous GUI to the given value.- Parameters:
gui
- The new GUIprevious
- The new previous GUI
-
change
Switches the current GUI with the given one, updating the processors- Parameters:
gui
- The new gui
-
unset
public void unset()Unsets the current GUI and sets it as previous -
unset
Unsets the given GUI and sets it as previous- Parameters:
gui
- The GUI
-
set
Sets the given GUI as current- Parameters:
gui
- The new GUI
-
setPrevious
Sets the given GUI as previous- Parameters:
gui
- The new previous GUI
-
registerGui
Registers a new GUI- Parameters:
gui
- The GUI to register
-
unregisterGui
Unregisters a GUI- Parameters:
gui
- The GUI to unregister- Returns:
- True if the GUI was unregistered
-
unregisterAll
public boolean unregisterAll()Unregisters all GUIs- Returns:
- True if operation succeeded
-
render
public void render(int rw, int rh) Renders the registered GUIs- Parameters:
rw
- The render widthrh
- The render height
-
addProcessor
Adds the stage of the given GUI to the processors in the input multiplexer- Parameters:
gui
- The gui
-
removeProcessor
-
update
public void update(double dt) Updates the registered GUIs- Parameters:
dt
- The delta time in seconds
-
publishReleaseNotes
public void publishReleaseNotes() -
dispose
public void dispose() -
notify
Description copied from interface:IObserver
Event notification call. -
removeControllerGui
public boolean removeControllerGui() -
removeModeChangePopup
public boolean removeModeChangePopup()
-