Custom Dialogs¶
Option Dialogs:
Enums¶
Choose Dialog Outcome¶
- class CommonChoiceOutcome¶
Bases:
CommonIntThe outcome of the player being given a choice.
- CANCEL = 0¶
- CHOICE_MADE = 1¶
- ERROR = 2¶
- NEXT = 3¶
- PREVIOUS = 4¶
- static is_error_or_cancel(result)¶
Determine if an outcome is either
ERRORorCANCEL.- Parameters:
result (CommonChoiceOutcome) – The result to check.
- Returns:
True, if result is either an Error or Cancel. False, if not.
- Return type:
bool
Utilities¶
Dialog Utils¶
- class CommonDialogUtils¶
Bases:
objectUtilities for use with dialogs.
- TEXT_INPUT_NAME = 'text_input'¶
- static get_chosen_item(dialog)¶
Retrieves the item chosen by the player from a dialog.
- Parameters:
dialog (Union[UiDialogObjectPicker, UiMultiPicker]) – The dialog to get the chosen item of.
- Returns:
The value of the chosen item.
- Return type:
Any
- static get_chosen_items(dialog)¶
Retrieves the items chosen by the player from a dialog.
- Parameters:
dialog (Union[UiDialogObjectPicker, UiMultiPicker]) – The dialog to get the chosen items of.
- Returns:
A collection of chosen items.
- Return type:
Tuple[Any]
- static get_input_value(dialog)¶
Retrieve the value entered by the player from an input dialog.
- Parameters:
dialog (UiDialogTextInput) – The dialog to get the chosen items of.
- Returns:
The value of the entered input.
- Return type:
Union[str, None]