RetroDECK/tools/configurator/components/popup.gd
monkeyx-net 58f0d2f283 On branch feat/godot-configurator
Changes to be committed:
	modified:   tools/configurator/components/popup.gd
2024-07-28 19:48:24 +01:00

19 lines
500 B
GDScript

extends Control
var content = null
@onready var custom_theme: Theme = get_tree().current_scene.custom_theme
func _ready():
$".".theme = custom_theme
if (content != null):
$Panel/MarginContainer/VBoxContainer/ContentContainer/MarginContainer.add_child(content)
func set_content(new_content):
content = load(new_content).instantiate()
func set_title(new_title):
$Panel/MarginContainer/VBoxContainer/MarginContainer/HBoxContainer/Label.text = new_title
func _on_back_pressed():
queue_free()