EditorSproutyDialogsCharacterEditor
Inherits: HSplitContainer
Description
This module is responsible for the character files creation and editing. It allows the user to edit character data, including the character's name, description, dialog box and portraits.
Properties
| Type | Name | Default |
|---|---|---|
| EditorUndoRedoManager | undo_redo | null |
Methods
| Return Type | Method |
|---|---|
| SproutyDialogsCharacterData | get_character_data() |
| void | load_character(data: SproutyDialogsCharacterData, name_data: Dictionary) |
| void | on_locales_changed() |
| void | on_translation_enabled_changed(enabled: bool) |
Signals
signal modified(modified: bool)
Triggered when something is modified in the character editor.
Property Descriptions
var undo_redo : EditorUndoRedoManager
UndoRedo manager for handling undo/redo operations in the character editor.
Method Descriptions
func get_character_data() -> SproutyDialogsCharacterData
Returns the character data from the editor. This includes the character's key name, display name (with translations), description, dialog box scene path, portrait settings, and portraits data.
func load_character(data: SproutyDialogsCharacterData, name_data: Dictionary) -> void
Load the character data into the editor. If name_data is provided, it will be used to load the name translations. Otherwise, the name translations will be loaded from the character data.
func on_locales_changed() -> void
Update name translations text boxes when locales change in the project settings. This method handles locale changes and updates the translation boxes accordingly.
func on_translation_enabled_changed(enabled: bool) -> void
Handle the translation enabled change. When enabled is true, shows translation boxes. When false, hides translation boxes and default locale label.