From 4dc99b2d0ac8cb741d1cd968d46026fae70d031e Mon Sep 17 00:00:00 2001 From: dusoleil Date: Sat, 20 Aug 2022 02:09:44 -0400 Subject: Add basic mockups of two screens and prototype navigation --- Main.gd | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Main.gd (limited to 'Main.gd') 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") + -- cgit v1.2.3