Package gaiasky.interafce
Class FullGui
java.lang.Object
gaiasky.interafce.AbstractGui
gaiasky.interafce.FullGui
public class FullGui extends AbstractGui
Full OpenGL GUI with all the controls and whistles.
-
Field Summary
Fields inherited from class gaiasky.interafce.AbstractGui
graphics, hoffset, interfaces, lock, name, skin, ui, unitsPerPixel, vr
-
Constructor Summary
Constructors Constructor Description FullGui(com.badlogic.gdx.backends.lwjgl3.Lwjgl3Graphics graphics, java.lang.Float unitsPerPixel)
-
Method Summary
Modifier and Type Method Description void
addControlsWindow()
protected void
buildGui()
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.void
initialize(com.badlogic.gdx.assets.AssetManager assetManager, com.badlogic.gdx.graphics.g2d.SpriteBatch sb)
Initializes the GUI, adding all the resources to the asset manager queue for loadingvoid
initialize(com.badlogic.gdx.scenes.scene2d.Stage ui)
void
initializeMinimap(com.badlogic.gdx.scenes.scene2d.Stage ui)
void
notify(Events event, java.lang.Object... data)
protected void
rebuildGui()
Adds the already created GUI objects to the stage.void
recalculateOptionsSize()
void
removeControlsWindow()
void
setSceneGraph(ISceneGraph sg)
void
setVisibilityToggles(ComponentTypes.ComponentType[] entities, ComponentTypes visible)
Sets the visibility state of the component entitiesvoid
showLoadProgressInterface(com.badlogic.gdx.scenes.scene2d.Stage ui, boolean show)
void
showMinimapInterface(com.badlogic.gdx.scenes.scene2d.Stage ui, boolean show)
void
showMinimapWindow(com.badlogic.gdx.scenes.scene2d.Stage ui, boolean show)
void
toggleMinimapInterface(com.badlogic.gdx.scenes.scene2d.Stage ui)
void
toggleMinimapWindow(com.badlogic.gdx.scenes.scene2d.Stage ui)
void
update(double dt)
Updates the GUIboolean
updateUnitsPerPixel(float upp)
Updates the units-per-pixel value of this GUI.Methods inherited from class gaiasky.interafce.AbstractGui
dispose, findActor, getGuiStage, getName, mustDraw, render, resize, resizeImmediate, setHoffset, setVr
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
controlsWindow
-
minimapWindow
-
fi
-
ti
-
ni
-
focusInterface
-
notificationsInterface
-
messagesInterface
-
customInterface
-
runStateInterface
-
topInfoInterface
-
minimapInterface
-
loadProgressInterface
-
memInfoWindow
-
logWindow
-
wikiInfoWindow
-
archiveViewWindow
-
nf
-
pointerXCoord
protected com.badlogic.gdx.scenes.scene2d.ui.Label pointerXCoord -
pointerYCoord
protected com.badlogic.gdx.scenes.scene2d.ui.Label pointerYCoord -
pad
protected float pad -
pad5
protected float pad5 -
sg
-
-
Constructor Details
-
FullGui
public FullGui(com.badlogic.gdx.backends.lwjgl3.Lwjgl3Graphics graphics, java.lang.Float unitsPerPixel)
-
-
Method Details
-
initialize
public void initialize(com.badlogic.gdx.assets.AssetManager assetManager, com.badlogic.gdx.graphics.g2d.SpriteBatch sb)Description copied from interface:IGui
Initializes the GUI, adding all the resources to the asset manager queue for loading- Parameters:
assetManager
- The asset manager to load the resources withsb
- The sprite batch to use for this GUI's stage
-
initialize
public void initialize(com.badlogic.gdx.scenes.scene2d.Stage ui) -
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- Parameters:
assetManager
- The asset manager
-
buildGui
protected void buildGui() -
recalculateOptionsSize
public void recalculateOptionsSize() -
rebuildGui
protected void rebuildGui()Description copied from class:AbstractGui
Adds the already created GUI objects to the stage.- Specified by:
rebuildGui
in classAbstractGui
-
cancelTouchFocus
public boolean cancelTouchFocus()Removes the focus from this Gui and returns true if the focus was in the GUI, false otherwise.- Specified by:
cancelTouchFocus
in interfaceIGui
- Overrides:
cancelTouchFocus
in classAbstractGui
- Returns:
- true if the focus was in the GUI, false otherwise.
-
update
public void update(double dt)Description copied from interface:IGui
Updates the GUI- Specified by:
update
in interfaceIGui
- Overrides:
update
in classAbstractGui
- Parameters:
dt
- Time in seconds since the last frame
-
notify
- Specified by:
notify
in interfaceIObserver
- Overrides:
notify
in classAbstractGui
-
setSceneGraph
-
setVisibilityToggles
Description copied from interface:IGui
Sets the visibility state of the component entities- Specified by:
setVisibilityToggles
in interfaceIGui
- Overrides:
setVisibilityToggles
in classAbstractGui
- Parameters:
entities
- The entitiesvisible
- The states
-
removeControlsWindow
public void removeControlsWindow() -
addControlsWindow
public void addControlsWindow() -
initializeMinimap
public void initializeMinimap(com.badlogic.gdx.scenes.scene2d.Stage ui) -
showMinimapInterface
public void showMinimapInterface(com.badlogic.gdx.scenes.scene2d.Stage ui, boolean show) -
showLoadProgressInterface
public void showLoadProgressInterface(com.badlogic.gdx.scenes.scene2d.Stage ui, boolean show) -
toggleMinimapInterface
public void toggleMinimapInterface(com.badlogic.gdx.scenes.scene2d.Stage ui) -
showMinimapWindow
public void showMinimapWindow(com.badlogic.gdx.scenes.scene2d.Stage ui, boolean show) -
toggleMinimapWindow
public void toggleMinimapWindow(com.badlogic.gdx.scenes.scene2d.Stage ui) -
updateUnitsPerPixel
public boolean updateUnitsPerPixel(float upp)Description copied from interface:IGui
Updates the units-per-pixel value of this GUI. The units-per-pixel is the same as 1/UI_SCALE.- Specified by:
updateUnitsPerPixel
in interfaceIGui
- Overrides:
updateUnitsPerPixel
in classAbstractGui
-