From febc05f628793d252066a173e8fce0826b2190fd Mon Sep 17 00:00:00 2001 From: dusoleil Date: Fri, 26 Aug 2022 03:48:27 -0400 Subject: Flesh Out Navigation and Populate Screens with Data --- screens/TimeSlot/Body.gd | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 screens/TimeSlot/Body.gd (limited to 'screens/TimeSlot/Body.gd') diff --git a/screens/TimeSlot/Body.gd b/screens/TimeSlot/Body.gd new file mode 100644 index 0000000..aa1f352 --- /dev/null +++ b/screens/TimeSlot/Body.gd @@ -0,0 +1,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) -- cgit v1.2.3