summaryrefslogtreecommitdiffstats
path: root/Main.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Main.gd')
-rw-r--r--Main.gd16
1 files changed, 16 insertions, 0 deletions
diff --git a/Main.gd b/Main.gd
new file mode 100644
index 0000000..0a80683
--- /dev/null
+++ b/Main.gd
@@ -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")
+