diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2022-08-26 03:48:27 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2022-08-26 03:48:27 -0400 |
commit | febc05f628793d252066a173e8fce0826b2190fd (patch) | |
tree | 163b05a21767704b70a1add51d94abc2f64f3b97 /screens/Task/Body.gd | |
parent | 4dc99b2d0ac8cb741d1cd968d46026fae70d031e (diff) | |
download | Planner-febc05f628793d252066a173e8fce0826b2190fd.tar.gz Planner-febc05f628793d252066a173e8fce0826b2190fd.zip |
Flesh Out Navigation and Populate Screens with Data
Diffstat (limited to 'screens/Task/Body.gd')
-rw-r--r-- | screens/Task/Body.gd | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/screens/Task/Body.gd b/screens/Task/Body.gd new file mode 100644 index 0000000..05c9e9e --- /dev/null +++ b/screens/Task/Body.gd @@ -0,0 +1,12 @@ +extends VBoxContainer + +func populate(data): + $"%Length".text = "%d min" % data.estimated_length + $"%Description".text = data.description if data.description != null else "" + var tasks = SubTask.get_by_task(data.id) + var SubTaskItem = load("res://screens/Task/SubTaskItem.tscn") + var task_list = $"%SubTaskList" + for task in tasks: + var item = SubTaskItem.instance() + item.populate(task) + task_list.add_child(item)
\ No newline at end of file |