From b52041d6d17a5be4b45addd020bc0523376f430c Mon Sep 17 00:00:00 2001 From: Jaap Marsman Date: Wed, 17 Aug 2022 20:57:17 +0800 Subject: [PATCH] continued UI work - User Info screen + fonts added --- godot/Assets/fonts/NotoSansDisplay-Black.ttf | 3 + .../fonts/NotoSansDisplay-BlackItalic.ttf | 3 + godot/Assets/fonts/NotoSansDisplay-Bold.ttf | 3 + .../fonts/NotoSansDisplay-BoldItalic.ttf | 3 + .../fonts/NotoSansDisplay-ExtraBold.ttf | 3 + .../fonts/NotoSansDisplay-ExtraBoldItalic.ttf | 3 + .../fonts/NotoSansDisplay-ExtraLight.ttf | 3 + .../NotoSansDisplay-ExtraLightItalic.ttf | 3 + godot/Assets/fonts/NotoSansDisplay-Italic.ttf | 3 + godot/Assets/fonts/NotoSansDisplay-Light.ttf | 3 + .../fonts/NotoSansDisplay-LightItalic.ttf | 3 + godot/Assets/fonts/NotoSansDisplay-Medium.ttf | 3 + .../fonts/NotoSansDisplay-MediumItalic.ttf | 3 + .../Assets/fonts/NotoSansDisplay-Regular.ttf | 3 + .../Assets/fonts/NotoSansDisplay-SemiBold.ttf | 3 + .../fonts/NotoSansDisplay-SemiBoldItalic.ttf | 3 + godot/Assets/fonts/NotoSansDisplay-Thin.ttf | 3 + .../fonts/NotoSansDisplay-ThinItalic.ttf | 3 + godot/birthday_selector.gd | 16 +++ godot/node_variables.gd | 4 +- godot/start_screen.tscn | 2 +- godot/user_details.tscn | 100 +++++++++++++----- godot/wb_theme.tres | 20 +++- 23 files changed, 162 insertions(+), 34 deletions(-) create mode 100644 godot/Assets/fonts/NotoSansDisplay-Black.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-BlackItalic.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-Bold.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-BoldItalic.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-ExtraBold.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-ExtraBoldItalic.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-ExtraLight.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-ExtraLightItalic.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-Italic.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-Light.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-LightItalic.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-Medium.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-MediumItalic.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-Regular.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-SemiBold.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-SemiBoldItalic.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-Thin.ttf create mode 100644 godot/Assets/fonts/NotoSansDisplay-ThinItalic.ttf create mode 100644 godot/birthday_selector.gd diff --git a/godot/Assets/fonts/NotoSansDisplay-Black.ttf b/godot/Assets/fonts/NotoSansDisplay-Black.ttf new file mode 100644 index 0000000..f670256 --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-Black.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cdff906bb52299af0846d1b301137b597ac904fd7561b8d41746181c0c84ed39 +size 359396 diff --git a/godot/Assets/fonts/NotoSansDisplay-BlackItalic.ttf b/godot/Assets/fonts/NotoSansDisplay-BlackItalic.ttf new file mode 100644 index 0000000..25b82ce --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-BlackItalic.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4cf33bb96e0cc2930237e15648a95ca1924760d9cfc41ef3f3de4aee746480a3 +size 381644 diff --git a/godot/Assets/fonts/NotoSansDisplay-Bold.ttf b/godot/Assets/fonts/NotoSansDisplay-Bold.ttf new file mode 100644 index 0000000..0dadc86 --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-Bold.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be531a8036d721a54555469ac64803d10ecc5f7095ba1551948b061bf46e5be0 +size 358984 diff --git a/godot/Assets/fonts/NotoSansDisplay-BoldItalic.ttf b/godot/Assets/fonts/NotoSansDisplay-BoldItalic.ttf new file mode 100644 index 0000000..b959bd5 --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-BoldItalic.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ffd6b6c07277ed241f8016ec0e73b074fc75b8c34d73ec155de228f5d623812 +size 381080 diff --git a/godot/Assets/fonts/NotoSansDisplay-ExtraBold.ttf b/godot/Assets/fonts/NotoSansDisplay-ExtraBold.ttf new file mode 100644 index 0000000..753355a --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-ExtraBold.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8710940e0c006c5262f7b36f79a7c030be27c9224aeee840aad929590da4af2 +size 359372 diff --git a/godot/Assets/fonts/NotoSansDisplay-ExtraBoldItalic.ttf b/godot/Assets/fonts/NotoSansDisplay-ExtraBoldItalic.ttf new file mode 100644 index 0000000..b441556 --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-ExtraBoldItalic.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3606472f7545728586c7e0c49ec830b5d6805c82d7973ba547e0b356962f752b +size 381824 diff --git a/godot/Assets/fonts/NotoSansDisplay-ExtraLight.ttf b/godot/Assets/fonts/NotoSansDisplay-ExtraLight.ttf new file mode 100644 index 0000000..3c7500f --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-ExtraLight.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:817224c71ec6ed8293c3ce0dc98c28f7ee91fb3cbcab9917c366790059097478 +size 359372 diff --git a/godot/Assets/fonts/NotoSansDisplay-ExtraLightItalic.ttf b/godot/Assets/fonts/NotoSansDisplay-ExtraLightItalic.ttf new file mode 100644 index 0000000..d419bd4 --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-ExtraLightItalic.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d9e9ab7a39b0de1d0ab4024009634b2304883a07921084f6ea8917fe24f580e +size 382696 diff --git a/godot/Assets/fonts/NotoSansDisplay-Italic.ttf b/godot/Assets/fonts/NotoSansDisplay-Italic.ttf new file mode 100644 index 0000000..0bfd6e9 --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-Italic.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db1e4162de01dc354072b1e415cbabe5959dcd4bd84108e4b83b4563db1b606d +size 380956 diff --git a/godot/Assets/fonts/NotoSansDisplay-Light.ttf b/godot/Assets/fonts/NotoSansDisplay-Light.ttf new file mode 100644 index 0000000..bd2737d --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-Light.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf3f8a9e427b76e627f7fa68e259a3a2d4ef50ed14244fa7359bc19284d72228 +size 359312 diff --git a/godot/Assets/fonts/NotoSansDisplay-LightItalic.ttf b/godot/Assets/fonts/NotoSansDisplay-LightItalic.ttf new file mode 100644 index 0000000..4e6a7cf --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-LightItalic.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cbbc4fe0eed3bd498dcd29e8e4ac30730fa9d0dac20a3ec149c796c0dcb83a04 +size 382292 diff --git a/godot/Assets/fonts/NotoSansDisplay-Medium.ttf b/godot/Assets/fonts/NotoSansDisplay-Medium.ttf new file mode 100644 index 0000000..93d6547 --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-Medium.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3c477b0c2d251286b1ae60b18622b6df47c723940bbc21327d37a9e2e30304e +size 359156 diff --git a/godot/Assets/fonts/NotoSansDisplay-MediumItalic.ttf b/godot/Assets/fonts/NotoSansDisplay-MediumItalic.ttf new file mode 100644 index 0000000..3be7cb3 --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-MediumItalic.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f45d976d7f360bc3b4c644f5c215467783b6fe0932cf87078b7a999a0d981de0 +size 381476 diff --git a/godot/Assets/fonts/NotoSansDisplay-Regular.ttf b/godot/Assets/fonts/NotoSansDisplay-Regular.ttf new file mode 100644 index 0000000..696c37f --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-Regular.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01db28ade3499d9e464f6aa5c8ba77874e6349adf53814fb8c46ab436b848040 +size 358696 diff --git a/godot/Assets/fonts/NotoSansDisplay-SemiBold.ttf b/godot/Assets/fonts/NotoSansDisplay-SemiBold.ttf new file mode 100644 index 0000000..3660d53 --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-SemiBold.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a5eee4de8be4c66bd1d6dd920c20d64352ee7fd40dac7dbc2ca4c16c3b7aecb +size 359316 diff --git a/godot/Assets/fonts/NotoSansDisplay-SemiBoldItalic.ttf b/godot/Assets/fonts/NotoSansDisplay-SemiBoldItalic.ttf new file mode 100644 index 0000000..b8c82de --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-SemiBoldItalic.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8987d29af4ae0cb4ffbbefdb1069dcf41b8b3413a0b0c032c533cb26f394d769 +size 381588 diff --git a/godot/Assets/fonts/NotoSansDisplay-Thin.ttf b/godot/Assets/fonts/NotoSansDisplay-Thin.ttf new file mode 100644 index 0000000..20ee7b4 --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-Thin.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8c83a81aeeac6dc596831e8c9cabb882898be75a09719449f58e651cbfcc2f2 +size 359084 diff --git a/godot/Assets/fonts/NotoSansDisplay-ThinItalic.ttf b/godot/Assets/fonts/NotoSansDisplay-ThinItalic.ttf new file mode 100644 index 0000000..79b692b --- /dev/null +++ b/godot/Assets/fonts/NotoSansDisplay-ThinItalic.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:108c532e8b271c38dd5771fd7c799143c8b63327fc90ea803c4fd2bc4ffb2c52 +size 382296 diff --git a/godot/birthday_selector.gd b/godot/birthday_selector.gd new file mode 100644 index 0000000..d3f923d --- /dev/null +++ b/godot/birthday_selector.gd @@ -0,0 +1,16 @@ +extends GridContainer + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/godot/node_variables.gd b/godot/node_variables.gd index 0b42201..24f7835 100644 --- a/godot/node_variables.gd +++ b/godot/node_variables.gd @@ -7,8 +7,8 @@ onready var user_menu = get_node("/root/main_screen/UI/top_container/user_detail onready var daily_prompts = get_node("/root/main_screen/UI/top_container/daily_prompts") -onready var user_name = get_node("/root/main_screen/UI/top_container/user_details/user_menu/textbox_user_name") -onready var first_time_label = get_node("/root/main_screen/UI/top_container/user_details/user_menu/label_first_time") +onready var user_name = get_node("/root/main_screen/UI/top_container/user_details/user_menu/green_panel/textbox_user_name") +onready var first_time_label = get_node("/root/main_screen/UI/top_container/user_details/user_menu/green_panel/label_first_time") onready var welcome_label = get_node("/root/main_screen/UI/top_container/start_menu/welcome_title") diff --git a/godot/start_screen.tscn b/godot/start_screen.tscn index 27d4495..b2969e8 100644 --- a/godot/start_screen.tscn +++ b/godot/start_screen.tscn @@ -37,9 +37,9 @@ margin_bottom = -48.0 theme = ExtResource( 5 ) [node name="start_menu" parent="UI/top_container" instance=ExtResource( 3 )] +visible = false [node name="user_details" parent="UI/top_container" instance=ExtResource( 2 )] -visible = false [node name="daily_prompts" parent="UI/top_container" instance=ExtResource( 4 )] visible = false diff --git a/godot/user_details.tscn b/godot/user_details.tscn index 6ce691c..e4ecc14 100644 --- a/godot/user_details.tscn +++ b/godot/user_details.tscn @@ -1,47 +1,89 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://button_user_save.gd" type="Script" id=1] [ext_resource path="res://wb_theme.tres" type="Theme" id=2] +[ext_resource path="res://birthday_selector.gd" type="Script" id=3] [node name="user_details" type="CanvasLayer"] -[node name="user_menu" type="VBoxContainer" parent="."] -margin_left = 10.0 -margin_top = 55.0 -margin_right = 1270.0 -margin_bottom = 665.0 -rect_min_size = Vector2( 1260, 610 ) - -[node name="label_first_time" type="Label" parent="user_menu"] -unique_name_in_owner = true -margin_right = 1260.0 -margin_bottom = 34.0 +[node name="user_menu" type="PanelContainer" parent="."] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -500.0 +margin_top = -300.0 +margin_right = 500.0 +margin_bottom = 300.0 theme = ExtResource( 2 ) -text = "First time user: Please fill in your FIRST NAME only below." -[node name="textbox_user_name" type="LineEdit" parent="user_menu"] +[node name="green_panel" type="Panel" parent="user_menu"] +margin_right = 1000.0 +margin_bottom = 600.0 +theme = ExtResource( 2 ) + +[node name="label_first_time" type="Label" parent="user_menu/green_panel"] unique_name_in_owner = true -margin_top = 42.0 -margin_right = 1260.0 -margin_bottom = 76.0 +anchor_right = 1.0 +margin_top = 3.0 +margin_bottom = 37.0 +theme = ExtResource( 2 ) +text = "First time user: Please fill in your first name below." +align = 1 + +[node name="textbox_user_name" type="LineEdit" parent="user_menu/green_panel"] +unique_name_in_owner = true +anchor_left = 0.5 +anchor_right = 0.5 +margin_left = -350.0 +margin_top = 41.0 +margin_right = 350.0 +margin_bottom = 75.0 theme = ExtResource( 2 ) caret_blink = true caret_blink_speed = 0.5 -[node name="button_user_save" type="Button" parent="user_menu"] -margin_top = 84.0 -margin_right = 1260.0 -margin_bottom = 118.0 -theme = ExtResource( 2 ) -text = "OK" -script = ExtResource( 1 ) +[node name="birthday_selector" type="GridContainer" parent="user_menu/green_panel"] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -134.0 +margin_top = -150.0 +margin_right = 133.0 +margin_bottom = -116.0 +columns = 2 +script = ExtResource( 3 ) -[node name="button_birth_day" type="MenuButton" parent="user_menu"] -margin_top = 126.0 -margin_right = 1260.0 -margin_bottom = 160.0 +[node name="button_birth_month" type="MenuButton" parent="user_menu/green_panel/birthday_selector"] +margin_right = 130.0 +margin_bottom = 34.0 +size_flags_horizontal = 3 +text = "Month" +items = [ "January", null, 0, false, false, 1, 0, null, "", false, "February", null, 0, false, false, 2, 0, null, "", false, "March", null, 0, false, false, 3, 0, null, "", false, "April", null, 0, false, false, 4, 0, null, "", false, "May", null, 0, false, false, 5, 0, null, "", false, "June", null, 0, false, false, 6, 0, null, "", false, "July", null, 0, false, false, 7, 0, null, "", false, "August", null, 0, false, false, 8, 0, null, "", false, "September", null, 0, false, false, 9, 0, null, "", false, "October", null, 0, false, false, 10, 0, null, "", false, "November", null, 0, false, false, 11, 0, null, "", false, "December", null, 0, false, false, 12, 0, null, "", false ] + +[node name="button_birth_day" type="MenuButton" parent="user_menu/green_panel/birthday_selector"] +margin_left = 138.0 +margin_right = 267.0 +margin_bottom = 34.0 focus_mode = 2 +size_flags_horizontal = 3 theme = ExtResource( 2 ) text = "Day" +items = [ "1", null, 0, false, false, 1, 0, null, "", false, "2", null, 0, false, false, 2, 0, null, "", false, "3", null, 0, false, false, 3, 0, null, "", false, "4", null, 0, false, false, 4, 0, null, "", false, "5", null, 0, false, false, 5, 0, null, "", false, "6", null, 0, false, false, 6, 0, null, "", false, "7", null, 0, false, false, 7, 0, null, "", false, "8", null, 0, false, false, 8, 0, null, "", false, "9", null, 0, false, false, 9, 0, null, "", false, "10", null, 0, false, false, 10, 0, null, "", false, "11", null, 0, false, false, 11, 0, null, "", false, "12", null, 0, false, false, 12, 0, null, "", false, "13", null, 0, false, false, 13, 0, null, "", false, "14", null, 0, false, false, 14, 0, null, "", false, "15", null, 0, false, false, 15, 0, null, "", false, "16", null, 0, false, false, 16, 0, null, "", false, "17", null, 0, false, false, 17, 0, null, "", false, "18", null, 0, false, false, 18, 0, null, "", false, "19", null, 0, false, false, 19, 0, null, "", false, "20", null, 0, false, false, 20, 0, null, "", false, "21", null, 0, false, false, 21, 0, null, "", false, "22", null, 0, false, false, 22, 0, null, "", false, "23", null, 0, false, false, 23, 0, null, "", false, "24", null, 0, false, false, 24, 0, null, "", false, "25", null, 0, false, false, 25, 0, null, "", false, "26", null, 0, false, false, 26, 0, null, "", false, "27", null, 0, false, false, 27, 0, null, "", false, "28", null, 0, false, false, 28, 0, null, "", false, "29", null, 0, false, false, 29, 0, null, "", false, "30", null, 0, false, false, 30, 0, null, "", false, "31", null, 0, false, false, 31, 0, null, "", false ] -[connection signal="pressed" from="user_menu/button_user_save" to="user_menu/button_user_save" method="_on_button_user_save_pressed"] +[node name="button_user_save" type="Button" parent="user_menu/green_panel"] +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +margin_left = -74.0 +margin_top = -49.0 +margin_right = 74.5701 +margin_bottom = -15.0 +theme = ExtResource( 2 ) +text = "Done" +expand_icon = true +script = ExtResource( 1 ) + +[connection signal="pressed" from="user_menu/green_panel/button_user_save" to="user_menu/green_panel/button_user_save" method="_on_button_user_save_pressed"] diff --git a/godot/wb_theme.tres b/godot/wb_theme.tres index 0d13a12..076d143 100644 --- a/godot/wb_theme.tres +++ b/godot/wb_theme.tres @@ -1,4 +1,4 @@ -[gd_resource type="Theme" load_steps=12 format=2] +[gd_resource type="Theme" load_steps=14 format=2] [ext_resource path="res://Assets/fonts/noto_sans_display_bold.ttf" type="DynamicFontData" id=1] [ext_resource path="res://Assets/fonts/noto_sans_display.ttf" type="DynamicFontData" id=2] @@ -22,7 +22,7 @@ corner_radius_bottom_right = 10 corner_radius_bottom_left = 10 [sub_resource type="StyleBoxFlat" id=6] -bg_color = Color( 0.462745, 0.662745, 0.560784, 1 ) +bg_color = Color( 0.941176, 0.772549, 0.517647, 1 ) corner_radius_top_left = 10 corner_radius_top_right = 10 corner_radius_bottom_right = 10 @@ -59,6 +59,20 @@ corner_radius_top_right = 10 corner_radius_bottom_right = 10 corner_radius_bottom_left = 10 +[sub_resource type="StyleBoxFlat" id=11] +bg_color = Color( 0.462745, 0.662745, 0.560784, 1 ) +border_width_left = 2 +border_width_top = 2 +border_width_right = 2 +border_width_bottom = 2 +border_color = Color( 0.207843, 0.219608, 0.317647, 1 ) +corner_radius_top_left = 10 +corner_radius_top_right = 10 +corner_radius_bottom_right = 10 +corner_radius_bottom_left = 10 + +[sub_resource type="StyleBoxEmpty" id=12] + [resource] Button/fonts/font = SubResource( 1 ) Button/styles/disabled = SubResource( 4 ) @@ -69,3 +83,5 @@ Button/styles/pressed = SubResource( 7 ) Label/fonts/font = SubResource( 3 ) LineEdit/fonts/font = SubResource( 8 ) LineEdit/styles/normal = SubResource( 9 ) +Panel/styles/panel = SubResource( 11 ) +PanelContainer/styles/panel = SubResource( 12 )