Class CutsceneScreenDisplay
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.rendering.RenderComponent
com.csse3200.game.ui.UIComponent
com.csse3200.game.components.cutscenes.CutsceneScreenDisplay
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,Renderable
,Comparable<Renderable>
The CutsceneScreenDisplay class manages the user interface for displaying cutscenes,
including text display, buttons to advance or exit the cutscene, and handling user input.
-
Field Summary
Fields inherited from class com.csse3200.game.ui.UIComponent
skin, stage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
create()
Initializes the cutscene UI, sets up buttons and listeners, and starts the cutscene text display.void
dispose()
Disposes of the cutscene screen display, clearing any UI elements.void
draw
(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Draw method for rendering the cutscene screen.com.badlogic.gdx.scenes.scene2d.Stage
getStage()
Gets the stage component for the cutscene display.com.badlogic.gdx.scenes.scene2d.ui.Table
getTable()
Gets the table for the cutscene UI.Gets the cutscene text display component for the cutscene.void
setStage
(com.badlogic.gdx.scenes.scene2d.Stage stage) Sets the stage for the cutscene display.void
setTable
(com.badlogic.gdx.scenes.scene2d.ui.Table table) Sets the table for the cutscene UI.void
setTextDisplay
(TextDisplay textDisplay) Sets the Cutscene Text Display Component for the cutscene.void
Sets up the text display for the screenMethods inherited from class com.csse3200.game.ui.UIComponent
getLayer, getZIndex
Methods inherited from class com.csse3200.game.rendering.RenderComponent
compareTo, render
Methods inherited from class com.csse3200.game.components.Component
earlyUpdate, getEntity, 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
-
CutsceneScreenDisplay
public CutsceneScreenDisplay(com.badlogic.gdx.scenes.scene2d.ui.Skin skin) -
CutsceneScreenDisplay
public CutsceneScreenDisplay()
-
-
Method Details
-
create
public void create()Initializes the cutscene UI, sets up buttons and listeners, and starts the cutscene text display.- Overrides:
create
in classUIComponent
-
setupTextDisplay
public void setupTextDisplay()Sets up the text display for the screen -
dispose
public void dispose()Disposes of the cutscene screen display, clearing any UI elements.- Specified by:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
- Overrides:
dispose
in classRenderComponent
-
draw
public void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Draw method for rendering the cutscene screen. Handled by the stage.- Specified by:
draw
in classRenderComponent
- Parameters:
batch
- The sprite batch used for rendering.
-
getStage
public com.badlogic.gdx.scenes.scene2d.Stage getStage()Gets the stage component for the cutscene display.- Returns:
- The Stage component for the cutscene.
-
setStage
public void setStage(com.badlogic.gdx.scenes.scene2d.Stage stage) Sets the stage for the cutscene display.- Parameters:
stage
- The stage to be set.
-
setTable
public void setTable(com.badlogic.gdx.scenes.scene2d.ui.Table table) Sets the table for the cutscene UI.- Parameters:
table
- The table to be set.
-
getTable
public com.badlogic.gdx.scenes.scene2d.ui.Table getTable()Gets the table for the cutscene UI.- Returns:
- The Table component
-
getTextDisplay
Gets the cutscene text display component for the cutscene.- Returns:
- A CutsceneTextDisplay component for the cutscene.
-
setTextDisplay
Sets the Cutscene Text Display Component for the cutscene.- Parameters:
textDisplay
- the CutsceneTextDisplay to be set.
-