From b4b522c407d76503a901fc33929be7127b85a0c9 Mon Sep 17 00:00:00 2001 From: Jaap Marsman Date: Wed, 10 May 2023 12:09:13 +0800 Subject: [PATCH] updated podbooker UI --- .DS_Store | Bin 6148 -> 6148 bytes podbooker/BookingScreen.gd | 9 ++-- podbooker/ButtonScript.gd | 7 ++- podbooker/MainStartScreen.tscn | 84 +++++++++++++++++++++++++++------ 4 files changed, 82 insertions(+), 18 deletions(-) diff --git a/.DS_Store b/.DS_Store index 886e28e362f2b5d040172e65be45f67ffd4c6f97..4dc8232bab48a7d46772defb02cb6611ec20c155 100644 GIT binary patch delta 37 scmZoMXffDe&&0?%*?}oqh=Vg;K&-mjKu5u#R!5=Q$kc4}TBdMO0JBF4jQ{`u delta 37 scmZoMXffDe&&0?+*?}oqh?6s3K&-mjKu5u#R!5=Q(8yx*TBdMO0J9SbiU0rr diff --git a/podbooker/BookingScreen.gd b/podbooker/BookingScreen.gd index b9fca7d..a4afc9d 100644 --- a/podbooker/BookingScreen.gd +++ b/podbooker/BookingScreen.gd @@ -18,6 +18,7 @@ extends CanvasLayer @onready var name4 = $"%Name4" @onready var form4 = $"%Form4" @onready var reason = $"%ReasonField" +@onready var book_pw = $"%BookPw" func _clear_form(): @@ -30,6 +31,7 @@ func _clear_form(): form3.text = "" form4.text = "" reason.text = "" + book_pw.text = "" func restore_names_to_four(): @@ -70,6 +72,7 @@ func _on_ClearButton_pressed(): var namer = "/root/MainStartScreen/ButtonGrid/" + important_vars.pod + "L" + str(important_vars.time) var sp = get_node(str(namer)) sp.text = "" - _clear_form() - _book_it() - _on_CancelButton_pressed() + if $"%BookPw".text == "WhoIsJaap": + _clear_form() + _book_it() + _on_CancelButton_pressed() diff --git a/podbooker/ButtonScript.gd b/podbooker/ButtonScript.gd index bf86d48..70f9880 100644 --- a/podbooker/ButtonScript.gd +++ b/podbooker/ButtonScript.gd @@ -107,7 +107,12 @@ func book_button_pressed(pod_name, lesson): # settings_button.visible = false if name1.text != "": clear_button.visible = true - + $"%ClearBookPw".visible = true + $"%BookPw".visible = true + if name1.text == "": + clear_button.visible = false + $"%ClearBookPw".visible = false + $"%BookPw".visible = false func _on_A1L1_pressed(): book_button_pressed("A1", 1) diff --git a/podbooker/MainStartScreen.tscn b/podbooker/MainStartScreen.tscn index ac04018..042a3a8 100644 --- a/podbooker/MainStartScreen.tscn +++ b/podbooker/MainStartScreen.tscn @@ -1169,41 +1169,77 @@ text = "[u]Lesson 1[/u] fit_content = true scroll_active = false -[node name="Lesson 2" type="Label" parent="LessonGrid"] +[node name="Lesson 2" type="RichTextLabel" parent="LessonGrid"] +custom_minimum_size = Vector2(90, 2.08165e-12) layout_mode = 2 size_flags_vertical = 6 -text = "Lesson 2" +theme_override_colors/default_color = Color(0, 0, 0, 1) +bbcode_enabled = true +text = "[u]Lesson 2[/u] +[color=gray]9.00-9.50[/color]" +fit_content = true +scroll_active = false -[node name="Lesson 3" type="Label" parent="LessonGrid"] +[node name="Lesson 3" type="RichTextLabel" parent="LessonGrid"] layout_mode = 2 size_flags_vertical = 6 -text = "Lesson 3" +theme_override_colors/default_color = Color(0, 0, 0, 1) +bbcode_enabled = true +text = "[u]Lesson 3[/u] +[color=gray]10.10-11.00[/color]" +fit_content = true +scroll_active = false -[node name="Lesson 4" type="Label" parent="LessonGrid"] +[node name="Lesson 4" type="RichTextLabel" parent="LessonGrid"] layout_mode = 2 size_flags_vertical = 6 -text = "Lesson 4" +theme_override_colors/default_color = Color(0, 0, 0, 1) +bbcode_enabled = true +text = "[u]Lesson 4[/u] +[color=gray]11.00-11.50[/color]" +fit_content = true +scroll_active = false -[node name="Lesson 5" type="Label" parent="LessonGrid"] +[node name="Lesson 5" type="RichTextLabel" parent="LessonGrid"] layout_mode = 2 size_flags_vertical = 6 -text = "Lesson 5" +theme_override_colors/default_color = Color(0, 0, 0, 1) +bbcode_enabled = true +text = "[u]Lesson 5[/u] +[color=gray]11.50-12.40[/color]" +fit_content = true +scroll_active = false -[node name="Lesson8" type="Label" parent="LessonGrid"] +[node name="Lesson8" type="RichTextLabel" parent="LessonGrid"] unique_name_in_owner = true layout_mode = 2 size_flags_vertical = 6 -text = "Lunch" +theme_override_colors/default_color = Color(0, 0, 0, 1) +bbcode_enabled = true +text = "[u]Lunch[/u] +[color=gray]12.40-13.30[/color]" +fit_content = true +scroll_active = false -[node name="Lesson 6" type="Label" parent="LessonGrid"] +[node name="Lesson 6" type="RichTextLabel" parent="LessonGrid"] layout_mode = 2 size_flags_vertical = 6 -text = "Lesson 6" +theme_override_colors/default_color = Color(0, 0, 0, 1) +bbcode_enabled = true +text = "[u]Lesson 6[/u] +[color=gray]13.30-14.20[/color]" +fit_content = true +scroll_active = false -[node name="Lesson 7" type="Label" parent="LessonGrid"] +[node name="Lesson 7" type="RichTextLabel" parent="LessonGrid"] layout_mode = 2 size_flags_vertical = 6 -text = "Lesson 7" +theme_override_colors/default_color = Color(0, 0, 0, 1) +bbcode_enabled = true +text = "[u]Lesson 7[/u] +[color=gray]14.20-15.10[/color]" +fit_content = true +scroll_active = false [node name="SettingsButton" type="TextureButton" parent="."] unique_name_in_owner = true @@ -1453,6 +1489,26 @@ layout_mode = 2 size_flags_horizontal = 3 text = "Clear Booking" +[node name="PwArea" type="HBoxContainer" parent="BookingScreen"] +offset_left = 389.0 +offset_top = 539.0 +offset_right = 765.0 +offset_bottom = 579.0 + +[node name="ClearBookPw" type="Label" parent="BookingScreen/PwArea"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +theme_override_colors/font_color = Color(0, 0, 0, 1) +text = "Clear Booking Password:" + +[node name="BookPw" type="LineEdit" parent="BookingScreen/PwArea"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +secret = true +expand_to_text_length = true + [node name="bookings" type="Node" parent="."] unique_name_in_owner = true script = ExtResource("8")