This contains the source code documentation of the class subsystem_Choices.


Inherits: DialogicSubsystem

Subsystem that manages showing and activating of choices.



voidclear_game_state ( clear_flag: int = 0 )
Arrayget_current_choice_indexes ( )
voidhide_all_choices ( )
boolis_question ( index: int )
voidshow_choice ( button_index: int, text: String, enabled: bool, event_index: int )
voidshow_current_choices ( instant: bool = true )


const HIDE = 0

No description available.

const DISABLE = 1

No description available.

const NONE = 0

No description available.

const NUMBERS = 1

No description available.


signal choice_selected ( info: Dictionary )

Emitted when a choice button was pressed. Info includes the keys 'button_index', 'text', 'event_index'.

signal choices_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 autofocus_first_choice = true

If true, the first (top-most) choice will be focused

var block_delay = 0.2

The delay between the choices becoming visible and being clickable. Can prevent accidental selection.

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.

var last_question_info =

Contains information on the latest question.

var reveal_by_input = false

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

var reveal_delay = 0.0

The delay between the text finishing revealing and the choices appearing

Method Descriptions

func clear_game_state ( clear_flag: int = 0 ) ⇒ void

No description available.

func get_current_choice_indexes ( ) ⇒ Array

No description available.

func hide_all_choices ( ) ⇒ void

Hides all choice buttons.

func is_question ( index: int ) ⇒ bool

No description available.

func show_choice ( button_index: int, text: String, enabled: bool, event_index: int ) ⇒ void

Adds a button with the given text that leads to the given event.

func show_current_choices ( instant: bool = true ) ⇒ void

Lists all current choices and shows buttons.