|
@@ -7,6 +7,10 @@ signal finished
|
|
|
|
|
|
@export var always_visible: bool = false
|
|
|
|
|
|
+@export_group("Processing management", "processing_")
|
|
|
+@export var processing_start_when_enabled := true ## Start processing when focused
|
|
|
+@export var processing_keep_when_disabled := false ## Enable to process at startup and keep processing after transitioning to another slide
|
|
|
+
|
|
|
var action_finish := "ui_accept"
|
|
|
var center_offset: Vector2
|
|
|
|
|
@@ -19,11 +23,18 @@ func _ready() -> void:
|
|
|
func disable() -> void:
|
|
|
set_process_unhandled_key_input(false)
|
|
|
|
|
|
+ if processing_keep_when_disabled:
|
|
|
+ return
|
|
|
+ set_process(false)
|
|
|
+
|
|
|
|
|
|
func enable() -> void:
|
|
|
set_visible(true)
|
|
|
set_process_unhandled_key_input(true)
|
|
|
|
|
|
+ if processing_start_when_enabled:
|
|
|
+ set_process(true)
|
|
|
+
|
|
|
|
|
|
func get_center() -> Vector2:
|
|
|
return get_position() + center_offset
|