summaryrefslogtreecommitdiffstats
path: root/screens/Task/Body.gd
diff options
context:
space:
mode:
Diffstat (limited to 'screens/Task/Body.gd')
-rw-r--r--screens/Task/Body.gd12
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