This contains the source code documentation of the class DialogicNode_ChoiceButton
.
DialogicNode_ChoiceButton
Inherits: Button
The button allows the player to make a choice in the Dialogic system.
Description
This class is used in the Choice Layer.
You may change the text_node
to any Node that has a text
property.
If you don't set the text_node
, the text will be set on this button instead. Using a different node may allow using rich text effects; they are not supported on buttons at this point.
Properties
Name | Type | Default |
---|---|---|
choice_index | int | -1 |
sound_pressed | AudioStream | |
sound_hover | AudioStream | |
sound_focus | AudioStream | |
text_node | Node |
Methods
Returns | Method |
---|---|
void | set_choice_text ( new_text : String ) |
Property Descriptions
Used to identify what choices to put on. If you leave it at -1, choices will be distributed automatically.
Can be set to play this sound when pressed. Requires a sibling DialogicNode_ButtonSound node.
Can be set to play this sound when hovered. Requires a sibling DialogicNode_ButtonSound node.
Can be set to play this sound when focused. Requires a sibling DialogicNode_ButtonSound node.
If set, the text will be set on this node's text
property instead.
Method Descriptions
func set_choice_text ( new_text
: String ) ⇒ void
Called when the text changes.