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 TypeMethodDescriptionvoidcreate()Initializes the cutscene UI, sets up buttons and listeners, and starts the cutscene text display.voiddispose()Disposes of the cutscene screen display, clearing any UI elements.voiddraw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Draw method for rendering the cutscene screen.com.badlogic.gdx.scenes.scene2d.StagegetStage()Gets the stage component for the cutscene display.com.badlogic.gdx.scenes.scene2d.ui.TablegetTable()Gets the table for the cutscene UI.Gets the cutscene text display component for the cutscene.voidsetStage(com.badlogic.gdx.scenes.scene2d.Stage stage) Sets the stage for the cutscene display.voidsetTable(com.badlogic.gdx.scenes.scene2d.ui.Table table) Sets the table for the cutscene UI.voidsetTextDisplay(TextDisplay textDisplay) Sets the Cutscene Text Display Component for the cutscene.voidSets up the text display for the screenMethods inherited from class com.csse3200.game.ui.UIComponent
getLayer, getZIndexMethods inherited from class com.csse3200.game.rendering.RenderComponent
compareTo, renderMethods inherited from class com.csse3200.game.components.Component
earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods 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:
createin 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:
disposein interfacecom.badlogic.gdx.utils.Disposable- Overrides:
disposein 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:
drawin 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.
-