summaryrefslogtreecommitdiffstats
path: root/screens/TimeSlot/Body.gd
diff options
context:
space:
mode:
authordusoleil <howcansocksbereal@gmail.com>2022-08-26 03:48:27 -0400
committerdusoleil <howcansocksbereal@gmail.com>2022-08-26 03:48:27 -0400
commitfebc05f628793d252066a173e8fce0826b2190fd (patch)
tree163b05a21767704b70a1add51d94abc2f64f3b97 /screens/TimeSlot/Body.gd
parent4dc99b2d0ac8cb741d1cd968d46026fae70d031e (diff)
downloadPlanner-febc05f628793d252066a173e8fce0826b2190fd.tar.gz
Planner-febc05f628793d252066a173e8fce0826b2190fd.zip
Flesh Out Navigation and Populate Screens with Data
Diffstat (limited to '')
-rw-r--r--screens/TimeSlot/Body.gd13
1 files changed, 13 insertions, 0 deletions
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)