RuneHive-Game
Loading...
Searching...
No Matches
InformationDialogue.java
Go to the documentation of this file.
1package com.runehive.content.dialogue;
2
3/**
4 * Handles the information box dialogue.
5 *
6 * @author Daniel
7 */
8public class InformationDialogue implements Chainable {
9
10 /** The title of the item dialogue. */
11 private final String title;
12
13 /** The context of the item dialogue. */
14 private final String[] lines;
15
16 /**
17 * Constructs a new <code>ItemDialogue</code>.
18 *
19 * @param title The title of the dialogue.
20 * @param lines The context of the dialogue.
21 */
22 public InformationDialogue(String title, String...lines) {
23 this.title = title;
24 this.lines = lines;
25 }
26
27 /**
28 * Gets the title of the dialogue.
29 *
30 * @return The dialogue title.
31 */
32 public String getTitle() {
33 return title;
34 }
35
36 /**
37 * Gets the context of the dialogue.
38 *
39 * @return The dialogue context.
40 */
41 public String[] getLines() {
42 return lines;
43 }
44
45 @Override
46 public void accept(DialogueFactory factory) {
47 factory.sendInformationBox(this);
48 }
49}
Represents a factory class that contains important functions for building dialogues.
final DialogueFactory sendInformationBox(String title, String...lines)
String[] getLines()
Gets the context of the dialogue.
final String title
The title of the item dialogue.
final String[] lines
The context of the item dialogue.
String getTitle()
Gets the title of the dialogue.
InformationDialogue(String title, String...lines)
Constructs a new ItemDialogue.
The chain-able itemcontainer that allows implementing dialogue factories the ability to chain togethe...