Class Dialogue.Builder
java.lang.Object
org.aselstudios.luxdialoguesapi.Builders.Dialogue.Builder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a page to this dialogue.build()Builds theDialogueinstance.setAnswerBackgroundImage(String image, String color, Integer offset) Configures the answer background image.setAnswerNumbers(Boolean value) Enables or disables numeric prefixes for answers.setAnswerText(String color, Integer offset, String selectedColor) Configures answer text formatting.setArrowImage(String image, String color, Integer offset) Configures the arrow image used for prompts.setCharacterImage(String image, String color, Integer offset) Configures the character image.setCharacterNameText(String text, String color, Integer offset) Configures the character name text.setDialogueBackgroundImage(String image, String color, Integer offset) Configures the dialogue background image.setDialogueID(String dialogueID) Sets the unique ID of this dialogue.setDialogueSpeed(Integer dialogueSpeed) Sets the dialogue typing speed.setDialogueText(String color, Integer offset) Configures dialogue text color and offset.Sets a visual or gameplay effect identifier applied during the dialogue.setFogImage(String image, String color) Configures the fog overlay image.Configures the composite name background image.setPreventExit(Boolean value) Sets whether the player is prevented from exiting the dialogue manually.setPreventSkip(Boolean value) Sets whether the player is prevented from skipping pages.Sets the range in blocks in which the dialogue should be visible/active.setSelectionSound(String selectionSound, String selectionSoundSource, Double selectionSoundVolume, Double selectionSoundPitch) Configures the answer selection sound effect.setTypingSound(String typingSound, String typingSoundSource, Double typingSoundVolume, Double typingSoundPitch) Configures the typing sound effect.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setDialogueID
Sets the unique ID of this dialogue.- Parameters:
dialogueID- unique dialogue identifier- Returns:
- this builder for chaining
-
setEffect
Sets a visual or gameplay effect identifier applied during the dialogue.- Parameters:
effect- effect identifier, implementation specific- Returns:
- this builder for chaining
-
setRange
Sets the range in blocks in which the dialogue should be visible/active.- Parameters:
range- range in blocks- Returns:
- this builder for chaining
-
setPreventExit
Sets whether the player is prevented from exiting the dialogue manually.- Parameters:
value-trueto prevent manual exit- Returns:
- this builder for chaining
-
setPreventSkip
Sets whether the player is prevented from skipping pages.- Parameters:
value-trueto prevent skipping- Returns:
- this builder for chaining
-
setCharacterNameText
Configures the character name text.- Parameters:
text- display textcolor- color code or identifieroffset- vertical offset in pixels/lines (implementation specific)- Returns:
- this builder for chaining
-
setCharacterImage
Configures the character image.- Parameters:
image- image identifiercolor- color tintoffset- vertical offset- Returns:
- this builder for chaining
-
setArrowImage
Configures the arrow image used for prompts.- Parameters:
image- image identifiercolor- color tintoffset- vertical offset- Returns:
- this builder for chaining
-
setDialogueBackgroundImage
Configures the dialogue background image.- Parameters:
image- image identifiercolor- color tintoffset- vertical offset- Returns:
- this builder for chaining
-
setAnswerBackgroundImage
Configures the answer background image.- Parameters:
image- image identifiercolor- color tintoffset- vertical offset- Returns:
- this builder for chaining
-
setNameImage
public Dialogue.Builder setNameImage(String startImage, String midImage, String endImage, String color, Integer offset) Configures the composite name background image.- Parameters:
startImage- starting segment imagemidImage- middle segment imageendImage- ending segment imagecolor- color tintoffset- vertical offset- Returns:
- this builder for chaining
-
setFogImage
Configures the fog overlay image.- Parameters:
image- image identifiercolor- color tint- Returns:
- this builder for chaining
-
setDialogueText
Configures dialogue text color and offset.- Parameters:
color- text coloroffset- vertical offset- Returns:
- this builder for chaining
-
setAnswerText
Configures answer text formatting.- Parameters:
color- normal answer coloroffset- vertical offsetselectedColor- color used for the selected answer- Returns:
- this builder for chaining
-
setAnswerNumbers
Enables or disables numeric prefixes for answers.- Parameters:
value-trueto show answer numbers- Returns:
- this builder for chaining
-
setDialogueSpeed
Sets the dialogue typing speed.- Parameters:
dialogueSpeed- speed value (implementation specific)- Returns:
- this builder for chaining
-
setTypingSound
public Dialogue.Builder setTypingSound(String typingSound, String typingSoundSource, Double typingSoundVolume, Double typingSoundPitch) Configures the typing sound effect.- Parameters:
typingSound- sound nametypingSoundSource- sound source (e.g.MASTER,VOICE)typingSoundVolume- volume (0.0–1.0)typingSoundPitch- pitch- Returns:
- this builder for chaining
-
setSelectionSound
public Dialogue.Builder setSelectionSound(String selectionSound, String selectionSoundSource, Double selectionSoundVolume, Double selectionSoundPitch) Configures the answer selection sound effect.- Parameters:
selectionSound- sound nameselectionSoundSource- sound sourceselectionSoundVolume- volume (0.0–1.0)selectionSoundPitch- pitch- Returns:
- this builder for chaining
-
addPage
Adds a page to this dialogue.- Parameters:
page- page instance- Returns:
- this builder for chaining
-
build
-