Class DialogueBoxDisplay

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, Renderable, Comparable<Renderable>

public class DialogueBoxDisplay extends UIComponent
Represents a Dialogue Box to be displayed randomly
  • Constructor Details

    • DialogueBoxDisplay

      public DialogueBoxDisplay()
  • Method Details

    • setMinimap

      public void setMinimap(MinimapComponent minimap)
      Set current minimap for reference
      Parameters:
      minimap - - current minimap
    • create

      public void create()
      Description copied from class: Component
      Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished.
      Overrides:
      create in class UIComponent
    • addActors

      public void addActors()
      Add all necessary dialogue box components
    • setDialogue

      public void setDialogue(String dialogue)
      Set current dialogue text to be displayed
      Parameters:
      dialogue - - dialogue text to be displayed
    • setTitle

      public void setTitle(String title)
      Set current title to be displayed
      Parameters:
      title - - title to be displayed
    • setImage

      public void setImage(String imagePath)
      Set current image to be displayed
      Parameters:
      imagePath - - image to be displayed
    • isHidden

      public boolean isHidden()
      Query if the dialogue box is currently invisible
      Returns:
      - true if invisible, false if else
    • hide

      public void hide()
      Make invisible if not already
    • show

      public void show()
      Make visible if not already
    • draw

      public void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)
      Query current sizing of window and UI items and size/position appropriately
      Specified by:
      draw in class RenderComponent
      Parameters:
      batch - Batch to render to.
    • dispose

      public void dispose()
      Description copied from class: Component
      Called when the component is disposed. Dispose of any internal resources here.
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class RenderComponent