frame-of-mind/src/ui/prompter/prompter.gd

15 lines
382 B
GDScript3
Raw Normal View History

2026-01-23 12:39:47 +00:00
extends Control
## Provides methods and pre-instantiated prompts that can be easily arranged.
class_name Prompter
signal action_performed(action: String)
var _prompts : Dictionary[StringName, Control] = {}
func _ready() -> void:
for prompt in get_tree().get_nodes_in_group("prompts"):
_prompts[prompt.name] = prompt
prompt.get_parent().remove_child(prompt)
print(prompt)