EditorSproutyDialogsSceneField
Inherits: HBoxContainer
Description
Component that allows to select a scene and show its path in the field. It has buttons to create a new scene of a given type and go to edit the scene.
Properties
| Type | Name | Default |
|---|---|---|
| SceneType | scene_type | - |
Methods
| Return Type | Method |
|---|---|
| void | set_scene_type(type: SceneType) |
| int | get_scene_uid() |
| String | get_scene_path() |
| void | set_scene_path(path: String) |
| void | clear_path() |
Signals
signal scene_path_changed(path: String)
Emitted when the scene is changed.
Enumerations
enum SceneType
Scene types available for selection
-
SceneType
DIALOG_BOX= 0Dialog box scene. The root of the scene must be a DialogBox node.
-
SceneType
PORTRAIT= 1Portrait scene. The root of the scene must be a DialogPortrait node.
Property Descriptions
var scene_type : SceneType
Scene type to load. Determines which scene types are available for selection and validation.
Method Descriptions
func set_scene_type(type: SceneType) -> void
Set the scene type to load. Updates the resource picker settings and dialog configuration based on the selected scene type.
func get_scene_uid() -> int
Returns the UID of the selected scene. Returns -1 if no valid scene is selected.
func get_scene_path() -> String
Returns the current scene path in the field. Returns an empty string if the path is not valid.
func set_scene_path(path: String) -> void
Set the scene path in the field. Validates the scene before setting it.
func clear_path() -> void
Clear the current value of the field.