Choices

This contains the source code documentation of the class subsystem_Choices.

subsystem_Choices

Inherits: DialogicSubsystem

Subsystem that manages showing and activating of choices.

Properties


Methods


Constants

const HIDE = 0

No description available.


const DISABLE = 1

No description available.


const NONE = 0

No description available.


const NUMBERS = 1

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

var last_question_info = {}

Contains information on the latest question.


var reveal_delay = 0.0

The delay between the text finishing revealing and the choices appearing


var reveal_by_input = false

If true the player has to click to reveal choices when they are reached


var block_delay = 0.2

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.


var hotkey_behaviour = 0

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.