mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-23 06:25:39 +00:00
20 lines
420 B
GDScript3
20 lines
420 B
GDScript3
|
extends Control
|
||
|
|
||
|
var content = null
|
||
|
|
||
|
# Called when the node enters the scene tree for the first time.
|
||
|
func _ready():
|
||
|
if (content != null):
|
||
|
$Panel/VBoxContainer/ContentContainer.add_child(content)
|
||
|
|
||
|
|
||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||
|
func _process(delta):
|
||
|
pass
|
||
|
|
||
|
func set_content(new_content):
|
||
|
content = load(new_content).instantiate()
|
||
|
|
||
|
func _on_back_pressed():
|
||
|
queue_free()
|