This contains the source code documentation of the class DialogicUtil
.
DialogicUtil
Inherits: RefCounted
Script that container helper methods for both editor and game execution. Used whenever the same thing is needed in different parts of the plugin.
Methods
Constants
No description available.
No description available.
No description available.
No description available.
No description available.
Method Descriptions
func get_editor_scale ( ) ⇒ float
This method should be used instead of EditorInterface.get_editor_scale(), because if you use that it will run perfectly fine from the editor, but crash when the game is exported.
func get_dialogic_plugin ( ) ⇒ Node
Although this does in fact always return a EditorPlugin node, that class is apparently not present in export and referencing it here creates a crash.
func autoload ( ) ⇒ DialogicGameHandler
Returns the autoload when in-game.
func listdir ( path
: String, files_only
: bool = true
, _throw_error
: bool = true
, full_file_path
: bool = false
, include_imports
: bool = false
) ⇒ Array
##############################################################################
func get_module_path ( name
: String, builtin
: bool = true
) ⇒ String
No description available.
func get_indexers ( include_custom
: bool = true
, force_reload
: bool = false
) ⇒ DialogicIndexer[]
No description available.
func pretty_name ( file_path
: String ) ⇒ String
Turns a file_path
from some_file.png
to Some File
.
func set_editor_setting ( setting
: String, value
: Variant ) ⇒ void
No description available.
func get_editor_setting ( setting
: String, default
: Variant = null
) ⇒ Variant
No description available.
func get_color_palette ( default
: bool = false
) ⇒ Dictionary
No description available.
func get_color ( value
: String ) ⇒ Color
No description available.
func is_physics_timer ( ) ⇒ bool
##############################################################################
func update_timer_process_callback ( timer
: Timer ) ⇒ void
No description available.
func multitween ( tweened_value
: Variant, item
: Node, property
: String, part
: String ) ⇒ void
##############################################################################
func get_next_translation_id ( ) ⇒ String
No description available.
func get_default_variables ( ) ⇒ Dictionary
No description available.
func list_variables ( dict
: Dictionary, path
: String = ""
, type
: int = 0
) ⇒ Array
No description available.
func get_variable_value_type ( value
: Variant ) ⇒ int
No description available.
func get_variable_type ( path
: String, dict
: Dictionary = {}
) ⇒ int
No description available.
func get_default_layout_base ( ) ⇒ PackedScene
No description available.
func get_fallback_style ( ) ⇒ DialogicStyle
No description available.
func get_default_style ( ) ⇒ DialogicStyle
No description available.
func get_style_by_name ( name
: String ) ⇒ DialogicStyle
No description available.
func apply_scene_export_overrides ( node
: Node, export_overrides
: Dictionary, apply
: bool = true
) ⇒ void
No description available.
func get_scene_export_defaults ( node
: Node ) ⇒ Dictionary
No description available.
func make_file_custom ( original_file
: String, target_folder
: String, new_file_name
: String = ""
, new_folder_name
: String = ""
) ⇒ String
No description available.
func customize_file ( original_file
: String, target_file
: String ) ⇒ String
No description available.
func setup_script_property_edit_node ( property_info
: Dictionary, value
: Variant, property_changed
: Callable ) ⇒ Control
No description available.
func get_custom_event_defaults ( event_name
: String ) ⇒ Dictionary
No description available.
func str_to_bool ( boolstring
: String ) ⇒ bool
No description available.
func logical_convert ( value
: Variant ) ⇒ Variant
No description available.
func str_to_hash_set ( source
: String ) ⇒ Dictionary
Takes source
and builds a dictionary of keys only. The values are null
.
func get_character_suggestions ( _search_text
: String, current_value
: DialogicCharacter = null
, allow_none
: bool = true
, allow_all
: bool = false
, editor_node
: Node = null
) ⇒ Dictionary
No description available.
func get_portrait_suggestions ( search_text
: String, character
: DialogicCharacter, allow_empty
: bool = false
, empty_text
: String = "Don\'t Change"
) ⇒ Dictionary
No description available.
func get_portrait_position_suggestions ( search_text
: String = ""
) ⇒ Dictionary
No description available.