Class GuiRegistry
java.lang.Object
gaiasky.gui.main.GuiRegistry
- All Implemented Interfaces:
IObserver
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGuiRegistry(com.badlogic.gdx.scenes.scene2d.ui.Skin skin, Scene scene) Create new GUI registry object. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProcessor(IGui gui) Adds the stage of the given GUI to the processors in the input multiplexer.voidSwitches the current GUI with the given one, updating the processors.voidSwitches the current GUI with the given one, updating the processors.voiddispose()voidEvent notification call.voidvoidregisterGui(IGui gui) Registers a new GUI.voidregisterSpecialGui(IGui gui) booleanbooleanvoidremoveProcessor(IGui gui) voidrender(int rw, int rh) Renders the registered GUIs.voidSets the given GUI as current.voidsetInputMultiplexer(com.badlogic.gdx.InputMultiplexer inputMultiplexer) voidsetPrevious(IGui gui) Sets the given GUI as previous.voidUnregisters all GUIs.voidunregisterGui(IGui gui) Unregisters a GUI.voidunregisterSpecialGui(IGui gui) voidunset()Unsets the current GUI and sets it as previous.voidUnsets the given GUI and sets it as previous.voidupdate(double dt) Updates the registered GUIs.
-
Field Details
-
scene
Scene reference. -
modeChangeInfoPopup
public com.badlogic.gdx.scenes.scene2d.ui.Table modeChangeInfoPopupMode change info popup. -
current
Current GUI object. -
previous
Previous GUI object, if any.
-
-
Constructor Details
-
GuiRegistry
Create new GUI registry object.
-
-
Method Details
-
setInputMultiplexer
public void setInputMultiplexer(com.badlogic.gdx.InputMultiplexer inputMultiplexer) -
change
-
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
-
setPrevious
Sets the given GUI as previous.- Parameters:
gui- The new previous GUI.
-
registerGui
-
registerSpecialGui
-
unregisterGui
-
unregisterSpecialGui
-
unregisterAll
public void unregisterAll()Unregisters all GUIs. -
render
public void render(int rw, int rh) Renders the registered GUIs.- Parameters:
rw- The render width.rh- 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
-
removeGamepadGui
public boolean removeGamepadGui() -
removeModeChangePopup
public boolean removeModeChangePopup()
-