Skip to content

SFXSelectionDialog ​

Inherits: ConfirmationDialog

Modular SFX selection dialog that works with any SFXSelection class type Uses static DatabaseAudio for all audio data access Now supports SFX type selection and uses ItemLists for better UX

Properties ​

Stringselection_class_type""
boolallow_type_changefalse # Whether to show type selector

Variables ​

Buttonremove_sfx_button
AudioStreamPlayeraudio_player
SFXSelectioncurrent_selection
boolis_loadingfalse
Array[String]available_sfx_types[ ... ]

Methods ​

voidedit_sfx_selection( selection: SFXSelection, class_type: String = "", allow_type_selection: bool = false )
voidedit_voice_line( selection: SFXSelection )
voidcreate_new_sfx_selection( class_type: String = "", lock_type: bool = false )
voidpreview_current_audio()
voidpreview_audio_manually()

Signals ​

selection_made( selection: SFXSelection ) ​

Property descriptions ​

String selection_class_type = "" ​

Set this before calling popup() to specify which SFX selection type to edit

bool allow_type_change = false # Whether to show type selector ​

No description yet.

Variable descriptions ​

Button remove_sfx_button ​

No description yet.

AudioStreamPlayer audio_player ​

No description yet.

SFXSelection current_selection ​

No description yet.

bool is_loading = false ​

No description yet.

Array[String] available_sfx_types ​

No description yet.

Method descriptions ​

void edit_sfx_selection( selection: SFXSelection, class_type: String = "", allow_type_selection: bool = false ) ​

Configure and show dialog for editing a specific SFX selection

void edit_voice_line( selection: SFXSelection ) ​

Edit a voice line: the dialog is locked to the Voiceline type (no type selector) for every place that holds a voice line (a conversation chat or reply, a Speak interaction, the Play Voice Line action). A sound of another kind that an older project holds there is replaced by a new voice line when the dialog is confirmed.

void create_new_sfx_selection( class_type: String = "", lock_type: bool = false ) ​

Create a new selection of the specified type with type selection enabled (lock_type: the type cannot be changed)

void preview_current_audio() ​

Preview the currently selected audio

void preview_audio_manually() ​

Manual preview method that can be called from UI