diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2022-08-20 02:09:44 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2022-08-20 02:09:44 -0400 |
commit | 4dc99b2d0ac8cb741d1cd968d46026fae70d031e (patch) | |
tree | 534d4a9198ff07292d870e3a4401a96eedf03a6a /Main.gd | |
parent | fafa76fe3ae14a02a71423843d1387a0930b00f6 (diff) | |
download | Planner-4dc99b2d0ac8cb741d1cd968d46026fae70d031e.tar.gz Planner-4dc99b2d0ac8cb741d1cd968d46026fae70d031e.zip |
Add basic mockups of two screens and prototype navigation
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") + |