summaryrefslogtreecommitdiffstats
path: root/screens/TimeSlot/Body.gd
blob: aa1f3522b7d39f69b3b22d21a46cd1f907822787 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
extends VBoxContainer

func populate(data):
	var start_time = DataHelpers.timeofday(data.start_time)
	var end_time = DataHelpers.timeofday(data.end_time)
	$"%TimeRange".text = "%s - %s" % [start_time, end_time]
	var tasks = Task.get_by_timeslot(data.id)
	var TaskItem = load("res://screens/TimeSlot/TaskItem.tscn")
	var task_list = $"%TaskList"
	for task in tasks:
		var item = TaskItem.instance()
		item.populate(task)
		task_list.add_child(item)