2 extends DialogicCharacterEditorMainSection
4 ## Character editor tab that allows setting a custom style fot the character.
7 hint_text = 'If a character style is set, dialogic will switch to this style, whenever the character speaks. \nFor this it\'s best to use a variation of the same layout to avoid instancing a lot.'
9 func _get_title() -> String:
13 func _ready() -> void:
14 %StyleName.resource_icon = get_theme_icon("PopupMenu", "EditorIcons")
15 %StyleName.get_suggestions_func = get_style_suggestions
18 func _load_character(character:DialogicCharacter) -> void:
19 %StyleName.set_value(character.custom_info.get('style', ''))
22 func _save_changes(character:DialogicCharacter) -> DialogicCharacter:
23 character.custom_info['style'] = %StyleName.current_value
27 func get_style_suggestions(filter:String="") -> Dictionary:
28 var styles: Array = ProjectSettings.get_setting('dialogic/layout/style_list', [])
30 suggestions["No Style"] = {'value': "", 'editor_icon': ["EditorHandleDisabled", "EditorIcons"]}
32 var style: DialogicStyle = load(i)
33 suggestions[style.name] = {'value': style.name, 'editor_icon': ["PopupMenu", "EditorIcons"]}