Package com.csse3200.game.ui.terminal
Class TerminalDisplay
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.rendering.RenderComponent
com.csse3200.game.ui.UIComponent
com.csse3200.game.components.screens.BaseScreenDisplay
com.csse3200.game.ui.terminal.TerminalDisplay
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,Renderable
,Comparable<Renderable>
-
Field Summary
Fields inherited from class com.csse3200.game.components.screens.BaseScreenDisplay
game, logger, neon, root
Fields inherited from class com.csse3200.game.ui.UIComponent
skin, stage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
buildUI
(com.badlogic.gdx.scenes.scene2d.ui.Table root) Subclasses implement their UI here using the providedroot
table.void
create()
Initialises common UI infrastructure and delegates toBaseScreenDisplay.buildUI(Table)
.void
draw
(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Stage handles rendering of attached actors.float
Default z-index; override in overlays that must sit above other UI.Methods inherited from class com.csse3200.game.components.screens.BaseScreenDisplay
addBody, addTitle, backMainMenu, button, dispose, makeSolidTexture, solidImage
Methods inherited from class com.csse3200.game.ui.UIComponent
getLayer
Methods inherited from class com.csse3200.game.rendering.RenderComponent
compareTo, disableComponent, enableComponent, isDisabled, render
Methods inherited from class com.csse3200.game.components.Component
earlyUpdate, getEntity, getPrio, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.csse3200.game.rendering.Renderable
render
-
Constructor Details
-
TerminalDisplay
-
-
Method Details
-
create
public void create()Description copied from class:BaseScreenDisplay
Initialises common UI infrastructure and delegates toBaseScreenDisplay.buildUI(Table)
.Creates
BaseScreenDisplay.root
, adds it to the stage, initialisesBaseScreenDisplay.neon
, and then callsBaseScreenDisplay.buildUI(Table)
for subclass-specific layout.- Overrides:
create
in classBaseScreenDisplay
-
buildUI
protected void buildUI(com.badlogic.gdx.scenes.scene2d.ui.Table root) Description copied from class:BaseScreenDisplay
Subclasses implement their UI here using the providedroot
table.- Specified by:
buildUI
in classBaseScreenDisplay
- Parameters:
root
- a fill-parent, centeredTable
already added to the stage
-
draw
public void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Description copied from class:BaseScreenDisplay
Stage handles rendering of attached actors.- Overrides:
draw
in classBaseScreenDisplay
- Parameters:
batch
- Batch to render to.
-
getZIndex
public float getZIndex()Description copied from class:BaseScreenDisplay
Default z-index; override in overlays that must sit above other UI.- Specified by:
getZIndex
in interfaceRenderable
- Overrides:
getZIndex
in classBaseScreenDisplay
- Returns:
- Z index
-