Class DialogueBoxService

java.lang.Object
com.csse3200.game.services.DialogueBoxService

public class DialogueBoxService extends Object
  • 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

      public String[][] 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

      public DialogueBox 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

      public Boolean getIsVisible()
      Returns if the current dialgoue box is visible
    • hideCurrentOverlay

      public void hideCurrentOverlay()
      Dispose of the current chat overlay if it exists.
    • updateText

      public void updateText(String[][] text, int priority)
      Update the current chat overlay if it exists also responsible for unhighlighting an entity if it exists.
    • updateText

      public void updateText(String[][] text, Entity entity, int priority)
      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