Class DialoguePanel

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static org.newdawn.slick.Font characterNameFont
      The font used when rendering the character's name
      private static double DELAY
      How long before the dialogue can be advanced after starting or switching
      private DialogueExchange exchange
      The dialogue that is currently being used
      boolean isShowing
      Whether or not the dialogue panel is showing (visible)
      static org.newdawn.slick.Font lineFont
      The font used when rendering the actual dialogue
      private short lineIndex
      An index, used as a multipler for the y-coordinate of each line of text
      static short MAX_LINES
      The maximum number of lines that can be displayed at once
      private org.newdawn.slick.Image moreLinesImage
      The image displayed when there are more lines available
      boolean readyToAdvance  
    • Constructor Summary

      Constructors 
      Constructor Description
      DialoguePanel()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void advance()
      Called when the space bar is pressed
      void delay()
      Disable advancing the dialogue for DELAY amount of time
      void hide()
      Makes the dialogue panel no longer visible
      void render​(org.newdawn.slick.Graphics graphics)  
      private void renderLine​(java.lang.String text, org.newdawn.slick.Graphics graphics)  
      void show()
      Makes the dialogue panel visible
      void startExchange​(DialogueExchange exchange)
      Sets exchange and calls show()
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DELAY

        private static final double DELAY
        How long before the dialogue can be advanced after starting or switching
        See Also:
        Constant Field Values
      • MAX_LINES

        public static final short MAX_LINES
        The maximum number of lines that can be displayed at once
        See Also:
        Constant Field Values
      • isShowing

        public boolean isShowing
        Whether or not the dialogue panel is showing (visible)
      • readyToAdvance

        public boolean readyToAdvance
      • lineIndex

        private short lineIndex
        An index, used as a multipler for the y-coordinate of each line of text
      • lineFont

        public static org.newdawn.slick.Font lineFont
        The font used when rendering the actual dialogue
      • characterNameFont

        private static final org.newdawn.slick.Font characterNameFont
        The font used when rendering the character's name
      • moreLinesImage

        private final org.newdawn.slick.Image moreLinesImage
        The image displayed when there are more lines available
      • exchange

        private DialogueExchange exchange
        The dialogue that is currently being used
    • Constructor Detail

      • DialoguePanel

        public DialoguePanel()
    • Method Detail

      • advance

        public void advance()
        Called when the space bar is pressed
      • delay

        public void delay()
        Disable advancing the dialogue for DELAY amount of time
      • show

        public void show()
        Makes the dialogue panel visible
      • hide

        public void hide()
        Makes the dialogue panel no longer visible
      • startExchange

        public void startExchange​(DialogueExchange exchange)
        Sets exchange and calls show()
        Parameters:
        exchange - The exchange to start
      • render

        public void render​(org.newdawn.slick.Graphics graphics)
        Overrides:
        render in class UIElement
      • renderLine

        private void renderLine​(java.lang.String text,
                                org.newdawn.slick.Graphics graphics)