EditorSproutyDialogsResourcePicker
Inherits: EditorResourcePicker
Description
Component that allows to pick a dialogue, character or scene resource. Provides resource type filtering and recent file path tracking for convenient resource selection.
Properties
| Type | Name | Default |
|---|---|---|
| ResourceType | resource_type | ResourceType.DIALOG_CHAR |
| bool | only_icon | false |
| bool | add_clear_button | false |
Methods
| Return Type | Method |
|---|---|
| void | set_resource_type(type: int) |
Signals
signal resource_picked(res: Resource)
Emitted when a resource is picked (changed). Use it instead of resource_changed.
signal clear_pressed
Emitted when the clear button is pressed.
Enumerations
enum ResourceType
Resource types available for picking
-
ResourceType
DIALOG_CHAR= 0Dialog or character resource
-
ResourceType
DIALOGUE= 1Dialogue resource only
-
ResourceType
CHARACTER= 2Character resource only
-
ResourceType
DIALOG_BOX= 3Dialog box scene resource
-
ResourceType
PORTRAIT_SCENE= 4Portrait scene resource
Property Descriptions
var resource_type : ResourceType = ResourceType.DIALOG_CHAR
Resource type to load. Determines which resource types are available for selection.
var only_icon : bool = false
If true, show the icon button without the arrow button.
var add_clear_button : bool = false
If true, a clear button will be added to the popup menu.
Method Descriptions
func set_resource_type(type: int) -> void
Set the resource type to load. Updates the base type filter and dialog settings based on the selected resource type.