Package com.csse3200.game.services
Class DialogueBoxService
java.lang.Object
com.csse3200.game.services.DialogueBoxService
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDialogueBoxService
(com.badlogic.gdx.scenes.scene2d.Stage stage) Create a new chat overlay with the given hint text. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Dispose of the current chat overlay if it exists.Returns the currentOverlay which can be null or not nullString[][]
getHints()
Retrieves a copy of the hints array used in the chat overlay.Returns if the current dialgoue box is visiblevoid
Dispose of the current chat overlay if it exists.void
Resizes the DialogueBox in the event the screen changes sizevoid
updateText
(String[][] text, int priority) Update the current chat overlay if it exists also responsible for unhighlighting an entity if it exists.void
updateText
(String[][] text, Entity entity, int priority) Update the current chat overlay if it exists also responsible for highlighting an entity.
-
Constructor Details
-
DialogueBoxService
public DialogueBoxService(com.badlogic.gdx.scenes.scene2d.Stage stage) Create a new chat overlay with the given hint text.
-
-
Method Details
-
getHints
Retrieves a copy of the hints array used in the chat overlay. This method returns a copy of the internal hints array to prevent external modification of the original data.- Returns:
- a copy of the hints array as a String[]
-
getCurrentOverlay
Returns the currentOverlay which can be null or not null -
disposeCurrentOverlay
public void disposeCurrentOverlay()Dispose of the current chat overlay if it exists. -
getIsVisible
Returns if the current dialgoue box is visible -
hideCurrentOverlay
public void hideCurrentOverlay()Dispose of the current chat overlay if it exists. -
updateText
Update the current chat overlay if it exists also responsible for unhighlighting an entity if it exists. -
updateText
Update the current chat overlay if it exists also responsible for highlighting an entity. -
resizeElements
public void resizeElements()Resizes the DialogueBox in the event the screen changes size
-