summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordusoleil <howcansocksbereal@gmail.com>2022-08-20 02:09:44 -0400
committerdusoleil <howcansocksbereal@gmail.com>2022-08-20 02:09:44 -0400
commit4dc99b2d0ac8cb741d1cd968d46026fae70d031e (patch)
tree534d4a9198ff07292d870e3a4401a96eedf03a6a
parentfafa76fe3ae14a02a71423843d1387a0930b00f6 (diff)
downloadPlanner-4dc99b2d0ac8cb741d1cd968d46026fae70d031e.tar.gz
Planner-4dc99b2d0ac8cb741d1cd968d46026fae70d031e.zip
Add basic mockups of two screens and prototype navigation
-rw-r--r--Main.gd16
-rw-r--r--Main.tscn47
-rw-r--r--fonts/DroidSans.ttfbin0 -> 190776 bytes
-rw-r--r--screens/Task/Body.tscn57
-rw-r--r--screens/Task/Header.gd4
-rw-r--r--screens/Task/Header.tscn33
-rw-r--r--screens/Task/SubtaskItem.tscn23
-rw-r--r--screens/TimeSlot/Body.tscn37
-rw-r--r--screens/TimeSlot/Header.gd4
-rw-r--r--screens/TimeSlot/Header.tscn33
-rw-r--r--screens/TimeSlot/TaskItem.tscn53
11 files changed, 306 insertions, 1 deletions
diff --git a/Main.gd b/Main.gd
new file mode 100644
index 0000000..0a80683
--- /dev/null
+++ b/Main.gd
@@ -0,0 +1,16 @@
+extends Control
+
+onready var header_container = $"%HeaderContent"
+onready var body_container = $"%BodyContent"
+
+func nav_screen(new_screen):
+ if header_container.get_child_count() > 0:
+ header_container.get_child(0).queue_free()
+ header_container.add_child(load("res://screens/"+new_screen+"/Header.tscn").instance())
+ if body_container.get_child_count() > 0:
+ body_container.get_child(0).queue_free()
+ body_container.add_child(load("res://screens/"+new_screen+"/Body.tscn").instance())
+
+func _ready():
+ nav_screen("TimeSlot")
+
diff --git a/Main.tscn b/Main.tscn
index 29114cb..8d16835 100644
--- a/Main.tscn
+++ b/Main.tscn
@@ -1,5 +1,50 @@
-[gd_scene format=2]
+[gd_scene load_steps=4 format=2]
+
+[ext_resource path="res://Main.gd" type="Script" id=1]
+
+[sub_resource type="StyleBoxFlat" id=2]
+bg_color = Color( 0.0784314, 0.0745098, 0.0745098, 1 )
+
+[sub_resource type="StyleBoxFlat" id=1]
+bg_color = Color( 0.501961, 0.501961, 0.501961, 1 )
[node name="Main" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
+script = ExtResource( 1 )
+
+[node name="Background" type="PanelContainer" parent="."]
+anchor_right = 1.0
+anchor_bottom = 1.0
+custom_styles/panel = SubResource( 2 )
+
+[node name="VBoxContainer" type="VBoxContainer" parent="Background"]
+margin_right = 1080.0
+margin_bottom = 1920.0
+
+[node name="HeaderBackground" type="PanelContainer" parent="Background/VBoxContainer"]
+margin_right = 1080.0
+margin_bottom = 220.0
+size_flags_vertical = 3
+size_flags_stretch_ratio = 0.13
+custom_styles/panel = SubResource( 1 )
+
+[node name="HeaderContent" type="MarginContainer" parent="Background/VBoxContainer/HeaderBackground"]
+unique_name_in_owner = true
+margin_right = 1080.0
+margin_bottom = 220.0
+custom_constants/margin_right = 20
+custom_constants/margin_top = 20
+custom_constants/margin_left = 20
+custom_constants/margin_bottom = 20
+
+[node name="BodyContent" type="MarginContainer" parent="Background/VBoxContainer"]
+unique_name_in_owner = true
+margin_top = 224.0
+margin_right = 1080.0
+margin_bottom = 1920.0
+size_flags_vertical = 3
+custom_constants/margin_right = 20
+custom_constants/margin_top = 20
+custom_constants/margin_left = 20
+custom_constants/margin_bottom = 20
diff --git a/fonts/DroidSans.ttf b/fonts/DroidSans.ttf
new file mode 100644
index 0000000..ad1efca
--- /dev/null
+++ b/fonts/DroidSans.ttf
Binary files differ
diff --git a/screens/Task/Body.tscn b/screens/Task/Body.tscn
new file mode 100644
index 0000000..9185ad4
--- /dev/null
+++ b/screens/Task/Body.tscn
@@ -0,0 +1,57 @@
+[gd_scene load_steps=5 format=2]
+
+[ext_resource path="res://fonts/DroidSans.ttf" type="DynamicFontData" id=1]
+[ext_resource path="res://screens/Task/SubtaskItem.tscn" type="PackedScene" id=2]
+
+[sub_resource type="DynamicFont" id=2]
+size = 100
+font_data = ExtResource( 1 )
+
+[sub_resource type="DynamicFont" id=3]
+size = 50
+font_data = ExtResource( 1 )
+
+[node name="TaskBody" type="VBoxContainer"]
+margin_left = 20.0
+margin_top = 20.0
+margin_right = 1046.0
+margin_bottom = 1664.0
+
+[node name="HBoxContainer" type="HBoxContainer" parent="."]
+margin_right = 1026.0
+margin_bottom = 300.0
+
+[node name="Length" type="Label" parent="HBoxContainer"]
+margin_right = 511.0
+margin_bottom = 300.0
+rect_min_size = Vector2( 0, 300 )
+size_flags_horizontal = 3
+custom_fonts/font = SubResource( 2 )
+text = "10 min."
+valign = 1
+clip_text = true
+
+[node name="Description" type="TextEdit" parent="HBoxContainer"]
+margin_left = 515.0
+margin_right = 1026.0
+margin_bottom = 300.0
+size_flags_horizontal = 3
+custom_fonts/font = SubResource( 3 )
+text = "Do various stretches.
+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
+readonly = true
+wrap_enabled = true
+
+[node name="ScrollContainer" type="ScrollContainer" parent="."]
+margin_top = 304.0
+margin_right = 1026.0
+margin_bottom = 1644.0
+size_flags_vertical = 3
+
+[node name="SubtaskList" type="VBoxContainer" parent="ScrollContainer"]
+unique_name_in_owner = true
+margin_right = 1026.0
+margin_bottom = 110.0
+size_flags_horizontal = 3
+
+[node name="TaskItem" parent="ScrollContainer/SubtaskList" instance=ExtResource( 2 )]
diff --git a/screens/Task/Header.gd b/screens/Task/Header.gd
new file mode 100644
index 0000000..ed2fe98
--- /dev/null
+++ b/screens/Task/Header.gd
@@ -0,0 +1,4 @@
+extends HBoxContainer
+
+func _on_Back_button_up():
+ $"/root/Main".nav_screen("TimeSlot")
diff --git a/screens/Task/Header.tscn b/screens/Task/Header.tscn
new file mode 100644
index 0000000..89e488c
--- /dev/null
+++ b/screens/Task/Header.tscn
@@ -0,0 +1,33 @@
+[gd_scene load_steps=4 format=2]
+
+[ext_resource path="res://fonts/DroidSans.ttf" type="DynamicFontData" id=1]
+[ext_resource path="res://screens/Task/Header.gd" type="Script" id=2]
+
+[sub_resource type="DynamicFont" id=2]
+size = 100
+font_data = ExtResource( 1 )
+
+[node name="TaskHeader" type="HBoxContainer"]
+margin_left = 20.0
+margin_top = 20.0
+margin_right = 1046.0
+margin_bottom = 198.0
+script = ExtResource( 2 )
+
+[node name="Name" type="Label" parent="."]
+margin_top = 30.0
+margin_right = 799.0
+margin_bottom = 147.0
+size_flags_horizontal = 3
+custom_fonts/font = SubResource( 2 )
+text = "Stretching"
+clip_text = true
+
+[node name="Back" type="Button" parent="."]
+margin_left = 803.0
+margin_right = 1026.0
+margin_bottom = 178.0
+custom_fonts/font = SubResource( 2 )
+text = "Back"
+
+[connection signal="button_up" from="Back" to="." method="_on_Back_button_up"]
diff --git a/screens/Task/SubtaskItem.tscn b/screens/Task/SubtaskItem.tscn
new file mode 100644
index 0000000..48fc590
--- /dev/null
+++ b/screens/Task/SubtaskItem.tscn
@@ -0,0 +1,23 @@
+[gd_scene load_steps=3 format=2]
+
+[ext_resource path="res://fonts/DroidSans.ttf" type="DynamicFontData" id=1]
+
+[sub_resource type="DynamicFont" id=1]
+size = 72
+font_data = ExtResource( 1 )
+
+[node name="TaskItem" type="MarginContainer"]
+margin_right = 1026.0
+margin_bottom = 110.0
+custom_constants/margin_top = 5
+custom_constants/margin_bottom = 5
+
+[node name="Button" type="Button" parent="."]
+margin_top = 5.0
+margin_right = 1026.0
+margin_bottom = 105.0
+rect_min_size = Vector2( 0, 100 )
+custom_fonts/font = SubResource( 1 )
+text = "Hip Flexor"
+clip_text = true
+align = 0
diff --git a/screens/TimeSlot/Body.tscn b/screens/TimeSlot/Body.tscn
new file mode 100644
index 0000000..2e6460a
--- /dev/null
+++ b/screens/TimeSlot/Body.tscn
@@ -0,0 +1,37 @@
+[gd_scene load_steps=4 format=2]
+
+[ext_resource path="res://fonts/DroidSans.ttf" type="DynamicFontData" id=1]
+[ext_resource path="res://screens/TimeSlot/TaskItem.tscn" type="PackedScene" id=2]
+
+[sub_resource type="DynamicFont" id=2]
+size = 100
+font_data = ExtResource( 1 )
+
+[node name="TimeSlotBody" type="VBoxContainer"]
+margin_left = 20.0
+margin_top = 20.0
+margin_right = 1046.0
+margin_bottom = 1664.0
+
+[node name="TimeRange" type="Label" parent="."]
+unique_name_in_owner = true
+margin_right = 1026.0
+margin_bottom = 117.0
+custom_fonts/font = SubResource( 2 )
+text = "12:30 AM - 1:00 AM"
+align = 1
+valign = 1
+
+[node name="ScrollContainer" type="ScrollContainer" parent="."]
+margin_top = 121.0
+margin_right = 1026.0
+margin_bottom = 1644.0
+size_flags_vertical = 3
+
+[node name="TaskList" type="VBoxContainer" parent="ScrollContainer"]
+unique_name_in_owner = true
+margin_right = 1026.0
+margin_bottom = 110.0
+size_flags_horizontal = 3
+
+[node name="TaskItem" parent="ScrollContainer/TaskList" instance=ExtResource( 2 )]
diff --git a/screens/TimeSlot/Header.gd b/screens/TimeSlot/Header.gd
new file mode 100644
index 0000000..009a9b4
--- /dev/null
+++ b/screens/TimeSlot/Header.gd
@@ -0,0 +1,4 @@
+extends HBoxContainer
+
+func _on_Back_button_up():
+ $"/root/Main".nav_screen("Task")
diff --git a/screens/TimeSlot/Header.tscn b/screens/TimeSlot/Header.tscn
new file mode 100644
index 0000000..2823e6a
--- /dev/null
+++ b/screens/TimeSlot/Header.tscn
@@ -0,0 +1,33 @@
+[gd_scene load_steps=4 format=2]
+
+[ext_resource path="res://fonts/DroidSans.ttf" type="DynamicFontData" id=1]
+[ext_resource path="res://screens/TimeSlot/Header.gd" type="Script" id=2]
+
+[sub_resource type="DynamicFont" id=2]
+size = 100
+font_data = ExtResource( 1 )
+
+[node name="TimeslotHeader" type="HBoxContainer"]
+margin_left = 20.0
+margin_top = 20.0
+margin_right = 1046.0
+margin_bottom = 198.0
+script = ExtResource( 2 )
+
+[node name="Name" type="Label" parent="."]
+margin_top = 30.0
+margin_right = 799.0
+margin_bottom = 147.0
+size_flags_horizontal = 3
+custom_fonts/font = SubResource( 2 )
+text = "Chores"
+clip_text = true
+
+[node name="Back" type="Button" parent="."]
+margin_left = 803.0
+margin_right = 1026.0
+margin_bottom = 178.0
+custom_fonts/font = SubResource( 2 )
+text = "Back"
+
+[connection signal="button_up" from="Back" to="." method="_on_Back_button_up"]
diff --git a/screens/TimeSlot/TaskItem.tscn b/screens/TimeSlot/TaskItem.tscn
new file mode 100644
index 0000000..75ef95d
--- /dev/null
+++ b/screens/TimeSlot/TaskItem.tscn
@@ -0,0 +1,53 @@
+[gd_scene load_steps=3 format=2]
+
+[ext_resource path="res://fonts/DroidSans.ttf" type="DynamicFontData" id=1]
+
+[sub_resource type="DynamicFont" id=1]
+size = 72
+font_data = ExtResource( 1 )
+
+[node name="TaskItem" type="MarginContainer"]
+margin_right = 1026.0
+margin_bottom = 110.0
+custom_constants/margin_top = 5
+custom_constants/margin_bottom = 5
+
+[node name="Button" type="Button" parent="."]
+margin_top = 5.0
+margin_right = 1026.0
+margin_bottom = 105.0
+rect_min_size = Vector2( 0, 100 )
+
+[node name="HBoxContainer" type="HBoxContainer" parent="Button"]
+margin_right = 1026.0
+margin_bottom = 100.0
+alignment = 2
+
+[node name="Name" type="Label" parent="Button/HBoxContainer"]
+margin_top = 8.0
+margin_right = 493.0
+margin_bottom = 92.0
+size_flags_horizontal = 3
+custom_fonts/font = SubResource( 1 )
+text = "Stretching"
+clip_text = true
+
+[node name="Length" type="Label" parent="Button/HBoxContainer"]
+margin_left = 497.0
+margin_top = 8.0
+margin_right = 722.0
+margin_bottom = 92.0
+custom_fonts/font = SubResource( 1 )
+text = "10 min"
+align = 2
+
+[node name="Frequency" type="Label" parent="Button/HBoxContainer"]
+margin_left = 726.0
+margin_top = 8.0
+margin_right = 1026.0
+margin_bottom = 92.0
+rect_min_size = Vector2( 300, 0 )
+custom_fonts/font = SubResource( 1 )
+text = "Daily"
+align = 2
+clip_text = true