diff options
Diffstat (limited to 'Main.gd')
-rw-r--r-- | Main.gd | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -0,0 +1,16 @@ +extends Control + +onready var header_container = $"%HeaderContent" +onready var body_container = $"%BodyContent" + +func nav_screen(new_screen): + if header_container.get_child_count() > 0: + header_container.get_child(0).queue_free() + header_container.add_child(load("res://screens/"+new_screen+"/Header.tscn").instance()) + if body_container.get_child_count() > 0: + body_container.get_child(0).queue_free() + body_container.add_child(load("res://screens/"+new_screen+"/Body.tscn").instance()) + +func _ready(): + nav_screen("TimeSlot") + |