summaryrefslogtreecommitdiffstats
path: root/Main.gd
blob: 0a80683f20ba89e2d6d44a476656610a8d083597 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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")