Class DialoguePanel
- java.lang.Object
-
- net.egartley.beyondorigins.core.abstracts.Renderable
-
- net.egartley.beyondorigins.core.ui.UIElement
-
- net.egartley.beyondorigins.core.ui.DialoguePanel
-
-
Field Summary
Fields Modifier and Type Field Description private static org.newdawn.slick.Font
characterNameFont
The font used when rendering the character's nameprivate static double
DELAY
How long before the dialogue can be advanced after starting or switchingprivate DialogueExchange
exchange
The dialogue that is currently being usedboolean
isShowing
Whether or not the dialogue panel is showing (visible)static org.newdawn.slick.Font
lineFont
The font used when rendering the actual dialogueprivate short
lineIndex
An index, used as a multipler for the y-coordinate of each line of textstatic short
MAX_LINES
The maximum number of lines that can be displayed at onceprivate org.newdawn.slick.Image
moreLinesImage
The image displayed when there are more lines availableboolean
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 pressedvoid
delay()
Disable advancing the dialogue forDELAY
amount of timevoid
hide()
Makes the dialogue panel no longer visiblevoid
render(org.newdawn.slick.Graphics graphics)
private void
renderLine(java.lang.String text, org.newdawn.slick.Graphics graphics)
void
show()
Makes the dialogue panel visiblevoid
startExchange(DialogueExchange exchange)
-
Methods inherited from class net.egartley.beyondorigins.core.ui.UIElement
isClickInBounds, tick
-
Methods inherited from class net.egartley.beyondorigins.core.abstracts.Renderable
setPosition, x, x, y, y
-
-
-
-
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
-
-
Method Detail
-
advance
public void advance()
Called when the space bar is pressed
-
delay
public void delay()
Disable advancing the dialogue forDELAY
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)
- Parameters:
exchange
- The exchange to start
-
render
public void render(org.newdawn.slick.Graphics graphics)
-
renderLine
private void renderLine(java.lang.String text, org.newdawn.slick.Graphics graphics)
-
-