Package gaia.cu9.ari.gaiaorbit.interfce
Interface IGui
-
- All Superinterfaces:
com.badlogic.gdx.utils.Disposable
- All Known Implementing Classes:
AbstractGui
,DebugGui
,FullGui
,HUDGui
,InitialGui
,LoadingGui
,RenderGui
,SpacecraftGui
,StereoGui
public interface IGui extends com.badlogic.gdx.utils.Disposable
An interface to be implemented by all top-level GUIs in Gaia Sky
-
-
Method Summary
All Methods Instance Methods Abstract 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
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 loadingvoid
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
setSceneGraph(ISceneGraph sg)
Sets the scene graph to this GUIvoid
setVisibilityToggles(ComponentTypes.ComponentType[] entities, ComponentTypes visible)
Sets the visibility state of the component entitiesvoid
update(double dt)
Updates the GUI
-
-
-
Method Detail
-
initialize
void initialize(com.badlogic.gdx.assets.AssetManager assetManager)
Initializes the GUI, adding all the resources to the asset manager queue for loading- Parameters:
assetManager
- The asset manager to load the resources with
-
doneLoading
void doneLoading(com.badlogic.gdx.assets.AssetManager assetManager)
Hook that runs after the assets have been loaded. Completes the initialization process- Parameters:
assetManager
- The asset manager
-
update
void update(double dt)
Updates the GUI- Parameters:
dt
- Time in seconds since the last frame
-
render
void render(int rw, int rh)
Renders this GUI- Parameters:
rw
- The render widthrh
- The render height
-
resize
void resize(int width, int height)
Resizes this GUI to the given values at the end of the current loop- Parameters:
width
- The new widthheight
- The new height
-
resizeImmediate
void resizeImmediate(int width, int height)
Resizes without waiting for the current loop to finish- Parameters:
width
- The new widthheight
- The new height
-
cancelTouchFocus
boolean cancelTouchFocus()
Removes the focus from this GUI and returns true if the focus was in the GUI, false otherwise.- Returns:
- true if the focus was in the GUI, false otherwise.
-
getGuiStage
com.badlogic.gdx.scenes.scene2d.Stage getGuiStage()
Returns the stage- Returns:
- The stage
-
setSceneGraph
void setSceneGraph(ISceneGraph sg)
Sets the scene graph to this GUI- Parameters:
sg
- The scene graph
-
setVisibilityToggles
void setVisibilityToggles(ComponentTypes.ComponentType[] entities, ComponentTypes visible)
Sets the visibility state of the component entities- Parameters:
entities
- The entitiesvisible
- The states
-
findActor
com.badlogic.gdx.scenes.scene2d.Actor findActor(java.lang.String name)
Returns the first actor found with the specified name. Note this recursively compares the name of every actor in the GUI.- Returns:
- The actor if it exists, null otherwise.
-
-