RetroDECK/tools/configurator/components/popup.gd

17 lines
400 B
GDScript3
Raw Normal View History

2024-01-11 18:19:16 +00:00
extends Control
var content = null
func _ready():
if (content != null):
$Panel/MarginContainer/VBoxContainer/ContentContainer/MarginContainer.add_child(content)
2024-01-11 18:19:16 +00:00
func set_content(new_content):
content = load(new_content).instantiate()
func set_title(new_title):
$Panel/MarginContainer/VBoxContainer/MarginContainer/HBoxContainer/Label.text = new_title
2024-01-11 18:19:16 +00:00
func _on_back_pressed():
queue_free()