Class Page.Builder
java.lang.Object
org.aselstudios.luxdialoguesapi.Builders.Page.Builder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds an answer option to this page.addExitAction(String action) Adds an action to be executed when the dialogue exits from this page.addExitCallback(DialogueCallback callback) Adds a callback to be invoked when the dialogue exits from this page.Adds a dialogue line to this page.addPostAction(String action) Adds an action to be executed after the page completes.addPostCallback(DialogueCallback callback) Adds a callback to be invoked after the page completes.addPreAction(String action) Adds an action to be executed before the page is shown.addPreCallback(DialogueCallback callback) Adds a callback to be invoked before the page is shown.build()Builds thePageinstance.Sets the default page IDs to go to when this page completes.Sets the unique ID of this page.setSteadyInfoLine(String steadyInfoLine) Adds a line that is shown once typing has completed.Sets the automatic page timer.setTypingInfoLine(String typingInfoLine) Adds a line that is shown while text is typing.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setID
Sets the unique ID of this page.- Parameters:
id- page identifier- Returns:
- this builder for chaining
-
setTimer
Sets the automatic page timer.- Parameters:
ticks- time in ticks before auto-advancing, ornullfor none- Returns:
- this builder for chaining
-
setGoTo
Sets the default page IDs to go to when this page completes.- Parameters:
goTo- list of page IDs- Returns:
- this builder for chaining
-
addLine
Adds a dialogue line to this page.- Parameters:
line- line of text to display- Returns:
- this builder for chaining
-
setTypingInfoLine
Adds a line that is shown while text is typing.- Parameters:
typingInfoLine- info line text- Returns:
- this builder for chaining
-
setSteadyInfoLine
Adds a line that is shown once typing has completed.- Parameters:
steadyInfoLine- info line text- Returns:
- this builder for chaining
-
addPreAction
Adds an action to be executed before the page is shown.- Parameters:
action- action string, implementation specific- Returns:
- this builder for chaining
-
addPostAction
Adds an action to be executed after the page completes.- Parameters:
action- action string, implementation specific- Returns:
- this builder for chaining
-
addExitAction
Adds an action to be executed when the dialogue exits from this page.- Parameters:
action- action string, implementation specific- Returns:
- this builder for chaining
-
addPreCallback
Adds a callback to be invoked before the page is shown.- Parameters:
callback- callback to invoke- Returns:
- this builder for chaining
-
addPostCallback
Adds a callback to be invoked after the page completes.- Parameters:
callback- callback to invoke- Returns:
- this builder for chaining
-
addExitCallback
Adds a callback to be invoked when the dialogue exits from this page.- Parameters:
callback- callback to invoke- Returns:
- this builder for chaining
-
addAnswer
Adds an answer option to this page.- Parameters:
answer- answer definition- Returns:
- this builder for chaining
-
build
Builds thePageinstance.- Returns:
- built page
- Throws:
IllegalStateException- if required fields are missing
-