This contains the source code documentation of the class subsystem_Choices
.
subsystem_Choices
Inherits: DialogicSubsystem
Subsystem that manages showing and activating of choices.
Properties
Name | Type | Default |
---|---|---|
last_question_info | Dictionary | {} |
reveal_delay | float | 0.0 |
reveal_by_input | bool | false |
block_delay | float | 0.2 |
autofocus_first_choice | bool | true |
default_false_behaviour | int | 0 |
hotkey_behaviour | int | 0 |
Methods
Returns | Method |
---|---|
void | clear_game_state ( _clear_flag : int = 0 ) |
void | hide_all_choices ( ) |
Dictionary | get_current_question_info ( ) |
void | show_current_question ( instant : bool = true ) |
DialogicNode_ChoiceButton | get_choice_button_node ( button_index : int ) |
Array | get_current_choice_indexes ( ) |
bool | is_question ( index : int ) |
Constants
No description available.
No description available.
No description available.
No description available.
Signals
signal choice_selected ( info
: Dictionary )
Emitted when a choice button was pressed. Info includes the keys 'button_index', 'text', 'event_index'.
signal question_shown ( info
: Dictionary )
Emitted when a set of choices is reached and shown. Info includes the keys 'choices' (an array of dictionaries with infos on all the choices).
Property Descriptions
Contains information on the latest question.
The delay between the text finishing revealing and the choices appearing
If true the player has to click to reveal choices when they are reached
The delay between the choices becoming visible and being clickable. Can prevent accidental selection.
var autofocus_first_choice = true
If true, the first (top-most) choice will be focused
var default_false_behaviour = 0
The behaviour of choices with a false condition and else_action set to DEFAULT.
Will add some hotkeys to the choices if different then HotkeyBehaviour.NONE.
Method Descriptions
func clear_game_state ( _clear_flag
: int = 0
) ⇒ void
No description available.
func hide_all_choices ( ) ⇒ void
Hides all choice buttons.
func get_current_question_info ( ) ⇒ Dictionary
Collects information on all the choices of the current question. The result is a dictionary like this: {'choices': [ {'event_index':10, 'button_index':1, 'disabled':false, 'text':"My Choice", 'visible':true}, {'event_index':15, 'button_index':2, 'disabled':false, 'text':"My Choice2", 'visible':true}, ]
func show_current_question ( instant
: bool = true
) ⇒ void
Lists all current choices and shows buttons.
func get_choice_button_node ( button_index
: int ) ⇒ DialogicNode_ChoiceButton
No description available.
func get_current_choice_indexes ( ) ⇒ Array
No description available.
func is_question ( index
: int ) ⇒ bool
No description available.