Package gaia.cu9.ari.gaiaorbit.interfce
Class HUDGui
- java.lang.Object
-
- gaia.cu9.ari.gaiaorbit.interfce.HUDGui
-
-
Field Summary
Fields Modifier and Type Field Description protected DebugInterface
debugInterface
protected FocusInfoInterface
focusInterface
protected RunStateInterface
inputInterface
protected com.badlogic.gdx.utils.Array<IGuiInterface>
interfaces
protected MessagesInterface
messagesInterface
protected NotificationsInterface
notificationsInterface
protected com.badlogic.gdx.scenes.scene2d.Stage
ui
The user interface stage
-
Constructor Summary
Constructors Constructor Description HUDGui()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancelTouchFocus()
Removes the focus from this GUI and returns true if the focus was in the GUI, false otherwise.void
dispose()
void
doneLoading(com.badlogic.gdx.assets.AssetManager assetManager)
Hook that runs after the assets have been loaded.com.badlogic.gdx.scenes.scene2d.Actor
findActor(java.lang.String name)
Returns the first actor found with the specified name.com.badlogic.gdx.scenes.scene2d.Stage
getGuiStage()
Returns the stagevoid
initialize(com.badlogic.gdx.assets.AssetManager assetManager)
Initializes the GUI, adding all the resources to the asset manager queue for loadingboolean
mustDraw()
Returns whether this GUI must be drawn or notvoid
rebuildGui()
void
render(int rw, int rh)
Renders this GUIvoid
resize(int width, int height)
Resizes this GUI to the given values at the end of the current loopvoid
resizeImmediate(int width, int height)
Resizes without waiting for the current loop to finishvoid
setHoffset(int hoffset)
Sets the horizontal offset, for VRvoid
setSceneGraph(ISceneGraph sg)
Sets the scene graph to this GUIvoid
setVisibilityToggles(ComponentTypes.ComponentType[] entities, ComponentTypes visible)
Sets the visibility state of the component entitiesvoid
setVr(boolean vr)
Whether this GUI is to be used in VR modevoid
update(double dt)
Updates the GUI
-
-
-
Field Detail
-
ui
protected com.badlogic.gdx.scenes.scene2d.Stage ui
The user interface stage
-
focusInterface
protected FocusInfoInterface focusInterface
-
notificationsInterface
protected NotificationsInterface notificationsInterface
-
messagesInterface
protected MessagesInterface messagesInterface
-
debugInterface
protected DebugInterface debugInterface
-
inputInterface
protected RunStateInterface inputInterface
-
interfaces
protected com.badlogic.gdx.utils.Array<IGuiInterface> interfaces
-
-
Method Detail
-
initialize
public void initialize(com.badlogic.gdx.assets.AssetManager assetManager)
Description copied from interface:IGui
Initializes the GUI, adding all the resources to the asset manager queue for loading- Specified by:
initialize
in interfaceIGui
- Parameters:
assetManager
- The asset manager to load the resources with
-
doneLoading
public void doneLoading(com.badlogic.gdx.assets.AssetManager assetManager)
Description copied from interface:IGui
Hook that runs after the assets have been loaded. Completes the initialization process- Specified by:
doneLoading
in interfaceIGui
- Parameters:
assetManager
- The asset manager
-
rebuildGui
public void rebuildGui()
-
dispose
public void dispose()
- Specified by:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
-
update
public void update(double dt)
Description copied from interface:IGui
Updates the GUI
-
render
public void render(int rw, int rh)
Description copied from interface:IGui
Renders this GUI
-
resize
public void resize(int width, int height)
Description copied from interface:IGui
Resizes this GUI to the given values at the end of the current loop
-
resizeImmediate
public void resizeImmediate(int width, int height)
Description copied from interface:IGui
Resizes without waiting for the current loop to finish- Specified by:
resizeImmediate
in interfaceIGui
- Parameters:
width
- The new widthheight
- The new height
-
cancelTouchFocus
public boolean cancelTouchFocus()
Description copied from interface:IGui
Removes the focus from this GUI and returns true if the focus was in the GUI, false otherwise.- Specified by:
cancelTouchFocus
in interfaceIGui
- Returns:
- true if the focus was in the GUI, false otherwise.
-
getGuiStage
public com.badlogic.gdx.scenes.scene2d.Stage getGuiStage()
Description copied from interface:IGui
Returns the stage- Specified by:
getGuiStage
in interfaceIGui
- Returns:
- The stage
-
setSceneGraph
public void setSceneGraph(ISceneGraph sg)
Description copied from interface:IGui
Sets the scene graph to this GUI- Specified by:
setSceneGraph
in interfaceIGui
- Parameters:
sg
- The scene graph
-
setVisibilityToggles
public void setVisibilityToggles(ComponentTypes.ComponentType[] entities, ComponentTypes visible)
Description copied from interface:IGui
Sets the visibility state of the component entities- Specified by:
setVisibilityToggles
in interfaceIGui
- Parameters:
entities
- The entitiesvisible
- The states
-
findActor
public com.badlogic.gdx.scenes.scene2d.Actor findActor(java.lang.String name)
Description copied from interface:IGui
Returns the first actor found with the specified name. Note this recursively compares the name of every actor in the GUI.
-
setHoffset
public void setHoffset(int hoffset)
Description copied from interface:IGui
Sets the horizontal offset, for VR- Specified by:
setHoffset
in interfaceIGui
- Parameters:
hoffset
- The horizontal offset in pixels
-
setVr
public void setVr(boolean vr)
Description copied from interface:IGui
Whether this GUI is to be used in VR mode
-
-