DialogicNode_ChoiceButton

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


Methods

ReturnsMethod
voidset_choice_text ( new_text: String )

Property Descriptions

var choice_index = -1

Used to identify what choices to put on. If you leave it at -1, choices will be distributed automatically.


var sound_pressed

Can be set to play this sound when pressed. Requires a sibling DialogicNode_ButtonSound node.


var sound_hover

Can be set to play this sound when hovered. Requires a sibling DialogicNode_ButtonSound node.


var sound_focus

Can be set to play this sound when focused. Requires a sibling DialogicNode_ButtonSound node.


var text_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.