Updates register screen visuals

This commit is contained in:
Dylan Sarrazyn
2024-02-20 16:07:14 +01:00
parent efaad2a0d0
commit 38a175bb9d
20 changed files with 241 additions and 134 deletions
@@ -1,18 +1,18 @@
[gd_resource type="AudioBusLayout" format=3 uid="uid://crtt36bkguxm5"]
[resource]
bus/0/volume_db = -0.130497
bus/0/volume_db = -14.3375
bus/1/name = &"Music"
bus/1/solo = false
bus/1/mute = false
bus/1/bypass_fx = false
bus/1/volume_db = 0.0
bus/1/volume_db = 0.662756
bus/1/send = &"Master"
bus/2/name = &"Voice"
bus/2/solo = false
bus/2/mute = false
bus/2/bypass_fx = false
bus/2/volume_db = -5.04538
bus/2/volume_db = -8.59515
bus/2/send = &"Master"
bus/3/name = &"Effects"
bus/3/solo = false
@@ -0,0 +1,7 @@
[gd_resource type="LabelSettings" format=3 uid="uid://ohvlqccl2oog"]
[resource]
font_size = 32
font_color = Color(1, 0.317647, 0.298039, 1)
outline_size = 1
outline_color = Color(0, 0, 0, 1)
+26 -1
View File
@@ -1,4 +1,4 @@
[gd_resource type="Theme" load_steps=23 format=3 uid="uid://dqjvrt5nrtwn1"]
[gd_resource type="Theme" load_steps=30 format=3 uid="uid://dqjvrt5nrtwn1"]
[ext_resource type="Texture2D" uid="uid://2pldpmhcg6v4" path="res://assets/theme/previous.svg" id="1_mdn6k"]
[ext_resource type="FontFile" uid="uid://c7hsjkvr1pbud" path="res://assets/fonts/ScriptEcoleNormal.otf" id="1_shpmh"]
@@ -177,6 +177,14 @@ corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 5
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_61sv1"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8tujn"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_3fet0"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_c4e5a"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_sfncn"]
bg_color = Color(0.254902, 0.329412, 0.572549, 1)
border_width_bottom = 2
@@ -187,6 +195,13 @@ bg_color = Color(0.376471, 0.470588, 0.780392, 1)
border_width_bottom = 2
border_color = Color(0, 0, 0, 1)
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_nolh0"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_unu58"]
bg_color = Color(0.458824, 0.392157, 0.658824, 1)
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_602tu"]
[resource]
AcceptDialog/styles/panel = SubResource("StyleBoxFlat_nikxc")
Button/colors/font_color = Color(1, 1, 1, 1)
@@ -217,6 +232,12 @@ FileDialog/icons/forward_folder = ExtResource("2_hbp6q")
FileDialog/icons/parent_folder = ExtResource("3_1nwm4")
FileDialog/icons/reload = ExtResource("4_ymfot")
FileDialog/icons/toggle_hidden = ExtResource("5_yja2v")
ItemList/colors/guide_color = Color(1, 1, 1, 0)
ItemList/constants/v_separation = 10
ItemList/styles/cursor = SubResource("StyleBoxEmpty_61sv1")
ItemList/styles/cursor_unfocused = SubResource("StyleBoxEmpty_8tujn")
ItemList/styles/focus = SubResource("StyleBoxEmpty_3fet0")
ItemList/styles/hovered = SubResource("StyleBoxEmpty_c4e5a")
Label/font_sizes/font_size = 42
LineEdit/constants/caret_width = 4
LineEdit/font_sizes/font_size = 32
@@ -228,6 +249,9 @@ PanelContainer/styles/panel = SubResource("StyleBoxFlat_3gh3j")
PopupMenu/font_sizes/font_size = 100
PopupMenu/fonts/font = ExtResource("1_shpmh")
PopupMenu/fonts/font_separator = ExtResource("1_shpmh")
ProgressBar/fonts/font = ExtResource("1_shpmh")
ProgressBar/styles/background = SubResource("StyleBoxEmpty_nolh0")
ProgressBar/styles/fill = SubResource("StyleBoxFlat_unu58")
TabBar/font_sizes/font_size = 70
TabBar/fonts/font = ExtResource("1_shpmh")
TabContainer/colors/drop_mark_color = Color(1, 1, 1, 1)
@@ -236,6 +260,7 @@ TabContainer/constants/outline_size = 1
TabContainer/constants/side_margin = 0
TabContainer/font_sizes/font_size = 70
TabContainer/fonts/font = ExtResource("1_shpmh")
TabContainer/styles/panel = SubResource("StyleBoxEmpty_602tu")
TabContainer/styles/tab_disabled = null
TabContainer/styles/tab_focus = null
TabContainer/styles/tab_hovered = null
+1
View File
@@ -62,6 +62,7 @@ func _go_to_step(step_index: int):
# Connect the step
next_step.back.connect(_on_step_back)
next_step.next.connect(_on_step_completed)
next_step.on_enter()
# Handles progress bar
progress_bar.set_value_with_tween(step_index)
+2 -17
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=15 format=3 uid="uid://b7cfjs2iipagq"]
[gd_scene load_steps=13 format=3 uid="uid://b7cfjs2iipagq"]
[ext_resource type="Script" path="res://sources/menus/register/register.gd" id="1_jsnxc"]
[ext_resource type="PackedScene" uid="uid://cp27bjh6v5bkj" path="res://sources/minigames/base/opening_curtain.tscn" id="2_kfcp0"]
@@ -13,17 +13,6 @@
[ext_resource type="Script" path="res://sources/menus/register/ProgressBar.gd" id="8_h8kqu"]
[ext_resource type="Texture2D" uid="uid://tcapan0mj64o" path="res://assets/minigames/minigame_ui/graphic/button_back_disabled.png" id="9_yv3y4"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0rcyk"]
border_width_left = 3
border_width_top = 3
border_width_right = 3
border_width_bottom = 3
expand_margin_top = 3.0
expand_margin_bottom = 3.0
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bhfkq"]
bg_color = Color(0, 0.607843, 0.831373, 1)
[node name="RegisterScreen" type="Control"]
layout_mode = 3
anchors_preset = 15
@@ -69,13 +58,9 @@ unique_name_in_owner = true
visible = false
layout_mode = 2
size_flags_vertical = 1
theme_override_colors/font_color = Color(0, 0, 0, 0)
theme_override_colors/font_outline_color = Color(0, 0, 0, 0)
theme_override_font_sizes/font_size = 50
theme_override_styles/background = SubResource("StyleBoxFlat_0rcyk")
theme_override_styles/fill = SubResource("StyleBoxFlat_bhfkq")
max_value = 10.0
step = 0.1
show_percentage = false
script = ExtResource("8_h8kqu")
[node name="Steps" type="Control" parent="."]
@@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://c73wkbttv0ou0"]
[gd_scene load_steps=10 format=3 uid="uid://c73wkbttv0ou0"]
[ext_resource type="PackedScene" uid="uid://bxd3i06rqpxf0" path="res://sources/menus/register/steps/base_step.tscn" id="1_g51ml"]
[ext_resource type="Script" path="res://addons/godot-form-validator/control_validator.gd" id="2_hidu6"]
@@ -6,6 +6,7 @@
[ext_resource type="Script" path="res://addons/godot-form-validator/rules/required_rule.gd" id="3_54aao"]
[ext_resource type="Script" path="res://sources/menus/register/steps/validation/item_list_validator.gd" id="4_bdvqa"]
[ext_resource type="Script" path="res://sources/utils/binder/control_binder.gd" id="5_w7o0m"]
[ext_resource type="LabelSettings" uid="uid://ohvlqccl2oog" path="res://resources/themes/error_label_settings.tres" id="7_kjn8t"]
[sub_resource type="Resource" id="Resource_kw8sn"]
script = ExtResource("3_54aao")
@@ -29,28 +30,41 @@ text = "Cancel"
[node name="QuestionLabel" parent="PanelContainer/QuestionContainer" index="0"]
text = "Choose the type of account"
[node name="TypeContainer" type="VBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="0"]
[node name="TypeContainer" type="HBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="0"]
layout_mode = 2
[node name="TypeSelectError" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/TypeContainer" index="0"]
visible = false
[node name="TypeSelectLabel" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/TypeContainer" index="0"]
custom_minimum_size = Vector2(350, 0)
layout_mode = 2
text = "Test"
vertical_alignment = 1
size_flags_vertical = 1
theme_override_font_sizes/font_size = 70
text = "Type :"
[node name="TypeSelect" type="ItemList" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/TypeContainer" index="1"]
[node name="VBoxContainer" type="VBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/TypeContainer" index="1"]
layout_mode = 2
size_flags_horizontal = 3
[node name="TypeSelect" type="ItemList" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/TypeContainer/VBoxContainer" index="0"]
layout_mode = 2
theme_override_font_sizes/font_size = 70
allow_search = false
auto_height = true
item_count = 2
item_0/text = "Teacher"
item_1/text = "Parent"
[node name="ControlValidator" type="Node" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/TypeContainer/TypeSelect" index="1"]
[node name="ControlValidator" type="Node" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/TypeContainer/VBoxContainer/TypeSelect" index="1"]
script = ExtResource("2_hidu6")
validator = SubResource("Resource_n0ht0")
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/TypeContainer/TypeSelect" index="2"]
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/TypeContainer/VBoxContainer/TypeSelect" index="2"]
anchors_preset = 0
script = ExtResource("5_w7o0m")
property_name = "account_type"
[node name="TypeSelectError" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/TypeContainer/VBoxContainer" index="1"]
visible = false
layout_mode = 2
text = "Test"
label_settings = ExtResource("7_kjn8t")
vertical_alignment = 1
+1 -1
View File
@@ -14,7 +14,7 @@ signal next(step : Step)
@export_multiline var question : String
@export var data : Resource
func _ready():
func on_enter() -> void:
form_binder.read(data)
question_label.text = question
+2 -2
View File
@@ -119,9 +119,9 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 50
theme_override_constants/margin_left = 250
theme_override_constants/margin_top = 50
theme_override_constants/margin_right = 50
theme_override_constants/margin_right = 250
theme_override_constants/margin_bottom = 50
[node name="FormValidator" type="Control" parent="Background/FormMargin"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=14 format=3 uid="uid://cwqcybk5tvbly"]
[gd_scene load_steps=15 format=3 uid="uid://cwqcybk5tvbly"]
[ext_resource type="PackedScene" uid="uid://bxd3i06rqpxf0" path="res://sources/menus/register/steps/base_step.tscn" id="1_66bx5"]
[ext_resource type="Script" path="res://addons/godot-form-validator/control_validator.gd" id="3_hblcf"]
@@ -7,6 +7,7 @@
[ext_resource type="Script" path="res://sources/utils/binder/control_binder.gd" id="6_ugvpe"]
[ext_resource type="Script" path="res://addons/godot-form-validator/validators/line_edit_validator.gd" id="6_viaho"]
[ext_resource type="Script" path="res://sources/menus/register/steps/validation/confirm_rule.gd" id="7_7y5q1"]
[ext_resource type="LabelSettings" uid="uid://ohvlqccl2oog" path="res://resources/themes/error_label_settings.tres" id="7_sndyb"]
[sub_resource type="Resource" id="Resource_os08u"]
script = ExtResource("4_4ltsd")
@@ -46,54 +47,80 @@ question = "Enter your credentials"
[node name="QuestionLabel" parent="PanelContainer/QuestionContainer" index="0"]
text = "Enter your credentials"
[node name="EmailContainer" type="VBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="0"]
[node name="EmailContainer" type="HBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="0"]
layout_mode = 2
[node name="EmailFieldError" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/EmailContainer" index="0"]
visible = false
[node name="EmailFieldLabel" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/EmailContainer" index="0"]
custom_minimum_size = Vector2(350, 0)
layout_mode = 2
vertical_alignment = 1
size_flags_vertical = 1
theme_override_font_sizes/font_size = 70
text = "Email :"
[node name="EmailField" type="LineEdit" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/EmailContainer" index="1"]
[node name="VBoxContainer" type="VBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/EmailContainer" index="1"]
layout_mode = 2
size_flags_horizontal = 3
[node name="EmailField" type="LineEdit" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/EmailContainer/VBoxContainer" index="0"]
layout_mode = 2
theme_override_font_sizes/font_size = 70
placeholder_text = "Email*"
placeholder_text = "kalulu@excellolab.org"
[node name="ControlValidator" type="Node" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/EmailContainer/EmailField" index="0"]
[node name="ControlValidator" type="Node" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/EmailContainer/VBoxContainer/EmailField" index="0"]
script = ExtResource("3_hblcf")
validator = SubResource("Resource_84kj5")
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/EmailContainer/EmailField" index="1"]
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/EmailContainer/VBoxContainer/EmailField" index="1"]
anchors_preset = 0
script = ExtResource("6_ugvpe")
property_name = "email"
[node name="PasswordContainer" type="VBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="1"]
layout_mode = 2
theme_override_constants/separation = 20
[node name="PasswordFieldError" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/PasswordContainer" index="0"]
[node name="EmailFieldError" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/EmailContainer/VBoxContainer" index="1"]
visible = false
layout_mode = 2
text = "Test"
label_settings = ExtResource("7_sndyb")
vertical_alignment = 1
[node name="PasswordField" type="LineEdit" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/PasswordContainer" index="1"]
[node name="HBoxContainer" type="HBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="1"]
layout_mode = 2
[node name="PasswordFieldLabel" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/HBoxContainer" index="0"]
custom_minimum_size = Vector2(350, 0)
layout_mode = 2
size_flags_vertical = 1
theme_override_font_sizes/font_size = 70
text = "Password :"
[node name="PasswordContainer" type="VBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/HBoxContainer" index="1"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/separation = 20
[node name="PasswordField" type="LineEdit" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/HBoxContainer/PasswordContainer" index="0"]
layout_mode = 2
theme_override_font_sizes/font_size = 70
placeholder_text = "Password*"
placeholder_text = "Password"
secret = true
[node name="ControlValidator" type="Node" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/PasswordContainer/PasswordField" index="0"]
[node name="ControlValidator" type="Node" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/HBoxContainer/PasswordContainer/PasswordField" index="0"]
script = ExtResource("3_hblcf")
validator = SubResource("Resource_icogs")
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/PasswordContainer/PasswordField" index="1"]
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/HBoxContainer/PasswordContainer/PasswordField" index="1"]
anchors_preset = 0
script = ExtResource("6_ugvpe")
property_name = "password"
[node name="PasswordConfirmField" type="LineEdit" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/PasswordContainer" index="2"]
[node name="PasswordConfirmField" type="LineEdit" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/HBoxContainer/PasswordContainer" index="1"]
layout_mode = 2
theme_override_font_sizes/font_size = 70
placeholder_text = "Confirm password*"
placeholder_text = "Confirm password"
secret = true
[node name="PasswordFieldError" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/HBoxContainer/PasswordContainer" index="2"]
visible = false
layout_mode = 2
text = "Test"
label_settings = ExtResource("7_sndyb")
vertical_alignment = 1
@@ -1,7 +1,8 @@
[gd_scene load_steps=3 format=3 uid="uid://dimxdgkufgo12"]
[gd_scene load_steps=4 format=3 uid="uid://dimxdgkufgo12"]
[ext_resource type="PackedScene" uid="uid://bxd3i06rqpxf0" path="res://sources/menus/register/steps/base_step.tscn" id="1_up4b7"]
[ext_resource type="Script" path="res://sources/menus/register/steps/general_conditions_step.gd" id="2_5ibpi"]
[ext_resource type="LabelSettings" uid="uid://ohvlqccl2oog" path="res://resources/themes/error_label_settings.tres" id="3_qdoff"]
[node name="GeneralConditionsStep" instance=ExtResource("1_up4b7")]
script = ExtResource("2_5ibpi")
@@ -73,6 +74,7 @@ unique_name_in_owner = true
visible = false
layout_mode = 2
text = "Please click accept to move forward"
label_settings = ExtResource("3_qdoff")
[node name="QuestionLabel" parent="PanelContainer/QuestionContainer" index="1"]
visible = false
@@ -1,10 +1,11 @@
[gd_scene load_steps=16 format=3 uid="uid://dc4eaxcunpmke"]
[gd_scene load_steps=17 format=3 uid="uid://dc4eaxcunpmke"]
[ext_resource type="PackedScene" uid="uid://bxd3i06rqpxf0" path="res://sources/menus/register/steps/base_step.tscn" id="1_ggdon"]
[ext_resource type="Script" path="res://addons/godot-form-validator/control_validator.gd" id="2_6d1eh"]
[ext_resource type="Script" path="res://addons/godot-form-validator/rules/required_rule.gd" id="3_pj58p"]
[ext_resource type="Script" path="res://sources/menus/register/steps/validation/item_list_validator.gd" id="4_fcdvy"]
[ext_resource type="Script" path="res://sources/utils/binder/control_binder.gd" id="5_kb1ut"]
[ext_resource type="LabelSettings" uid="uid://ohvlqccl2oog" path="res://resources/themes/error_label_settings.tres" id="6_nuhb7"]
[ext_resource type="Script" path="res://addons/godot-form-validator/rules/length_rule.gd" id="6_qcc6t"]
[ext_resource type="Script" path="res://addons/godot-form-validator/rules/alpha_rule.gd" id="7_0a041"]
[ext_resource type="Script" path="res://addons/godot-form-validator/validators/line_edit_validator.gd" id="7_22xb4"]
@@ -48,17 +49,23 @@ question = "Enter the informations of player %d"
[node name="QuestionLabel" parent="PanelContainer/QuestionContainer" index="0"]
text = "Enter the informations of player %d"
[node name="LevelContainer" type="VBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="0"]
[node name="LevelContainer" type="HBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="0"]
layout_mode = 2
[node name="LevelSelectError" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/LevelContainer" index="0"]
visible = false
[node name="LevelSelectLabel" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/LevelContainer" index="0"]
custom_minimum_size = Vector2(350, 0)
layout_mode = 2
text = "Test"
vertical_alignment = 1
size_flags_vertical = 1
theme_override_font_sizes/font_size = 70
text = "Level :"
[node name="LevelSelect" type="ItemList" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/LevelContainer" index="1"]
[node name="VBoxContainer" type="VBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/LevelContainer" index="1"]
layout_mode = 2
size_flags_horizontal = 3
[node name="LevelSelect" type="ItemList" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/LevelContainer/VBoxContainer" index="0"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 70
auto_height = true
item_count = 3
@@ -66,45 +73,76 @@ item_0/text = "Beginner"
item_1/text = "Reviewer"
item_2/text = "Adult"
[node name="ControlValidator" type="Node" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/LevelContainer/LevelSelect" index="1"]
[node name="ControlValidator" type="Node" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/LevelContainer/VBoxContainer/LevelSelect" index="1"]
script = ExtResource("2_6d1eh")
validator = SubResource("Resource_pdktm")
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/LevelContainer/LevelSelect" index="2"]
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/LevelContainer/VBoxContainer/LevelSelect" index="2"]
anchors_preset = 0
script = ExtResource("5_kb1ut")
property_name = "level"
[node name="NameContainer" type="VBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="1"]
layout_mode = 2
[node name="NameFieldError" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/NameContainer" index="0"]
[node name="LevelSelectError" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/LevelContainer/VBoxContainer" index="1"]
visible = false
layout_mode = 2
text = "Test"
label_settings = ExtResource("6_nuhb7")
vertical_alignment = 1
[node name="NameField" type="LineEdit" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/NameContainer" index="1"]
[node name="NameContainer" type="HBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="1"]
layout_mode = 2
theme_override_font_sizes/font_size = 70
placeholder_text = "Name"
[node name="ControlValidator" type="Node" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/NameContainer/NameField" index="0"]
[node name="NameFieldLabel" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/NameContainer" index="0"]
custom_minimum_size = Vector2(350, 0)
layout_mode = 2
size_flags_vertical = 1
theme_override_font_sizes/font_size = 70
text = "Name :"
[node name="VBoxContainer" type="VBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/NameContainer" index="1"]
layout_mode = 2
size_flags_horizontal = 3
[node name="NameField" type="LineEdit" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/NameContainer/VBoxContainer" index="0"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 70
placeholder_text = "Kalulu"
[node name="ControlValidator" type="Node" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/NameContainer/VBoxContainer/NameField" index="0"]
script = ExtResource("2_6d1eh")
validator = SubResource("Resource_40trb")
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/NameContainer/NameField" index="1"]
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/NameContainer/VBoxContainer/NameField" index="1"]
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("5_kb1ut")
property_name = "name"
[node name="AgeField" type="SpinBox" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="2"]
[node name="NameFieldError" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/NameContainer/VBoxContainer" index="1"]
visible = false
layout_mode = 2
text = "Test"
label_settings = ExtResource("6_nuhb7")
[node name="AgeContainer" type="HBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="2"]
layout_mode = 2
[node name="AgeLabel" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/AgeContainer" index="0"]
custom_minimum_size = Vector2(350, 0)
layout_mode = 2
theme_override_font_sizes/font_size = 70
text = "Age :"
[node name="AgeField" type="SpinBox" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/AgeContainer" index="1"]
layout_mode = 2
size_flags_horizontal = 3
theme = ExtResource("9_x0cdr")
min_value = 1.0
value = 1.0
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/AgeField" index="2"]
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/AgeContainer/AgeField" index="2"]
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
@@ -5,4 +5,7 @@
[node name="PlayersCountStep" instance=ExtResource("1_6th8p")]
device_id = 1
step_name = "players"
question = "Choose the number of splayers"
question = "Choose the number of players"
[node name="StudentsCountFieldLabel" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/StudentsCountContainer" index="0"]
text = "Players :"
+16 -19
View File
@@ -2,44 +2,41 @@ extends Step
const device_recap_scene : PackedScene = preload("res://sources/menus/register/steps/device_recap.tscn")
@onready var recap_container = %RecapContainer
@onready var recap_container : VBoxContainer = %RecapContainer
@onready var email : Label = %Email
@onready var account_type : Label = %AccountType
@onready var education_method : Label = %EducationMethod
@onready var devices_count : Label = %DevicesCount
@onready var students_count : Label = %StudentsCount
func _ready():
super._ready()
var register_data = data as TeacherSettings
if not register_data:
func on_enter():
var teacher_settings = data as TeacherSettings
if not teacher_settings:
return
email.text = email.text % register_data.email
account_type.text = account_type.text % register_data.account_type
email.text = "Email address : %s" % teacher_settings.email
account_type.text = "Account type : %s" % TeacherSettings.AccountType.keys()[teacher_settings.account_type]
if register_data.account_type == TeacherSettings.AccountType.Teacher:
education_method.text = education_method.text % register_data.education_method
if teacher_settings.account_type == TeacherSettings.AccountType.Teacher:
education_method.text = "Education method : %s" % TeacherSettings.EducationMethod.keys()[teacher_settings.education_method]
education_method.show()
else:
education_method.hide()
devices_count.text = devices_count.text % register_data.students.size()
devices_count.text = "Number of devices : %d" % teacher_settings.students.size()
students_count.text = students_count.text % register_data.get_students_count()
students_count.text = "Number of students : %d" % teacher_settings.get_students_count()
for device in register_data.students.keys():
for child in recap_container.get_children(false):
child.queue_free()
for device in teacher_settings.students.keys():
var device_recap : DeviceRecap = device_recap_scene.instantiate()
if register_data.account_type == TeacherSettings.AccountType.Teacher:
if teacher_settings.account_type == TeacherSettings.AccountType.Teacher:
device_recap.title = "Device %d" % device
else:
device_recap.title = "Players"
device_recap.students = register_data.students[device]
device_recap.students = teacher_settings.students[device]
recap_container.add_child(device_recap)
@@ -42,31 +42,26 @@ theme_override_constants/separation = 20
unique_name_in_owner = true
layout_mode = 2
theme_override_font_sizes/font_size = 50
text = "Email address : %s"
[node name="AccountType" type="Label" parent="PanelContainer/QuestionContainer/VBoxContainer/ScrollContainer/VBoxContainer" index="1"]
unique_name_in_owner = true
layout_mode = 2
theme_override_font_sizes/font_size = 50
text = "Account type : %s"
[node name="EducationMethod" type="Label" parent="PanelContainer/QuestionContainer/VBoxContainer/ScrollContainer/VBoxContainer" index="2"]
unique_name_in_owner = true
layout_mode = 2
theme_override_font_sizes/font_size = 50
text = "Education method : %s"
[node name="DevicesCount" type="Label" parent="PanelContainer/QuestionContainer/VBoxContainer/ScrollContainer/VBoxContainer" index="3"]
unique_name_in_owner = true
layout_mode = 2
theme_override_font_sizes/font_size = 50
text = "Number of devices : %d"
[node name="StudentsCount" type="Label" parent="PanelContainer/QuestionContainer/VBoxContainer/ScrollContainer/VBoxContainer" index="4"]
unique_name_in_owner = true
layout_mode = 2
theme_override_font_sizes/font_size = 50
text = "Number of students : %d"
[node name="RecapContainer" type="VBoxContainer" parent="PanelContainer/QuestionContainer/VBoxContainer/ScrollContainer/VBoxContainer" index="5"]
unique_name_in_owner = true
@@ -11,14 +11,25 @@ question = "Choose the number of devices"
[node name="QuestionLabel" parent="PanelContainer/QuestionContainer" index="0"]
text = "Choose the number of devices"
[node name="DevicesCountField" type="SpinBox" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="0"]
[node name="DevicesCountContainer" type="HBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="0"]
layout_mode = 2
[node name="DevicesCountLabel" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/DevicesCountContainer" index="0"]
custom_minimum_size = Vector2(350, 0)
layout_mode = 2
size_flags_vertical = 1
theme_override_font_sizes/font_size = 70
text = "Devices :"
[node name="DevicesCountField" type="SpinBox" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/DevicesCountContainer" index="1"]
layout_mode = 2
size_flags_horizontal = 3
theme = ExtResource("2_ux74f")
min_value = 1.0
max_value = 90.0
value = 1.0
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/DevicesCountField" index="2"]
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/DevicesCountContainer/DevicesCountField" index="2"]
anchors_preset = 0
script = ExtResource("2_asuou")
property_name = "devices_count"
@@ -1,10 +1,11 @@
[gd_scene load_steps=8 format=3 uid="uid://buhnx0oblueuq"]
[gd_scene load_steps=9 format=3 uid="uid://buhnx0oblueuq"]
[ext_resource type="PackedScene" uid="uid://bxd3i06rqpxf0" path="res://sources/menus/register/steps/base_step.tscn" id="1_ksrhk"]
[ext_resource type="Script" path="res://addons/godot-form-validator/control_validator.gd" id="2_03dua"]
[ext_resource type="Script" path="res://addons/godot-form-validator/rules/required_rule.gd" id="3_qewnl"]
[ext_resource type="Script" path="res://sources/utils/binder/control_binder.gd" id="4_1k1yt"]
[ext_resource type="Script" path="res://sources/menus/register/steps/validation/item_list_validator.gd" id="4_rimto"]
[ext_resource type="LabelSettings" uid="uid://ohvlqccl2oog" path="res://resources/themes/error_label_settings.tres" id="6_sf33v"]
[sub_resource type="Resource" id="Resource_kw8sn"]
script = ExtResource("3_qewnl")
@@ -23,16 +24,21 @@ question = "Choose the education method"
[node name="QuestionLabel" parent="PanelContainer/QuestionContainer" index="0"]
text = "Choose the education method"
[node name="MethodContainer" type="VBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="0"]
[node name="MethodContainer" type="HBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="0"]
layout_mode = 2
[node name="MethodSelectError" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/MethodContainer" index="0"]
visible = false
[node name="MethodSelectLabel" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/MethodContainer" index="0"]
custom_minimum_size = Vector2(350, 0)
layout_mode = 2
text = "Test"
vertical_alignment = 1
size_flags_vertical = 1
theme_override_font_sizes/font_size = 70
text = "Method :"
[node name="MethodSelect" type="ItemList" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/MethodContainer" index="1"]
[node name="VBoxContainer" type="VBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/MethodContainer" index="1"]
layout_mode = 2
size_flags_horizontal = 3
[node name="MethodSelect" type="ItemList" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/MethodContainer/VBoxContainer" index="0"]
layout_mode = 2
theme_override_font_sizes/font_size = 70
auto_height = true
@@ -40,11 +46,18 @@ item_count = 2
item_0/text = "App Only"
item_1/text = "Complete"
[node name="ControlValidator" type="Node" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/MethodContainer/MethodSelect" index="1"]
[node name="ControlValidator" type="Node" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/MethodContainer/VBoxContainer/MethodSelect" index="1"]
script = ExtResource("2_03dua")
validator = SubResource("Resource_ar6ux")
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/MethodContainer/MethodSelect" index="2"]
[node name="ControlBinder" type="Control" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/MethodContainer/VBoxContainer/MethodSelect" index="2"]
anchors_preset = 0
script = ExtResource("4_1k1yt")
property_name = "education_method"
[node name="MethodSelectError" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/MethodContainer/VBoxContainer" index="1"]
visible = false
layout_mode = 2
text = "Test"
label_settings = ExtResource("6_sf33v")
vertical_alignment = 1
@@ -10,9 +10,19 @@ device_id = 0
step_name = "students"
question = "Choose the number of students on device %d"
[node name="StudentsCountField" type="SpinBox" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="0"]
[node name="StudentsCountContainer" type="HBoxContainer" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer" index="0"]
layout_mode = 2
[node name="StudentsCountFieldLabel" type="Label" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/StudentsCountContainer" index="0"]
custom_minimum_size = Vector2(350, 0)
layout_mode = 2
theme_override_font_sizes/font_size = 70
text = "Students :"
[node name="StudentsCountField" type="SpinBox" parent="Background/FormMargin/FormValidator/FormBinder/FormContainer/StudentsCountContainer" index="1"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme = ExtResource("3_pacdw")
min_value = 1.0
max_value = 90.0
@@ -31,11 +31,6 @@ func _on_back_button_pressed():
get_tree().change_scene_to_file(login_menu_path)
func _on_button_pressed():
if UserDataManager.teacher_settings:
print(UserDataManager.teacher_settings.students)
func _on_logout_button_pressed():
UserDataManager.logout()
get_tree().change_scene_to_file(main_menu_path)
+1 -6
View File
@@ -85,17 +85,12 @@ theme_override_font_sizes/font_size = 70
text = "Add student"
[node name="DeleteDeviceButton" type="Button" parent="VBoxContainer/InterfaceBottom/Container"]
visible = false
layout_mode = 2
theme_override_font_sizes/font_size = 70
text = "Delete device"
[node name="PrintButton" type="Button" parent="VBoxContainer/InterfaceBottom/Container"]
layout_mode = 2
theme_override_font_sizes/font_size = 70
text = "Print"
[connection signal="pressed" from="InterfaceLeft/Container/BackButton" to="." method="_on_back_button_pressed"]
[connection signal="pressed" from="InterfaceLeft/Container/LogoutButton" to="." method="_on_logout_button_pressed"]
[connection signal="pressed" from="VBoxContainer/InterfaceBottom/Container/AddDeviceButton" to="." method="_on_add_device_button_pressed"]
[connection signal="pressed" from="VBoxContainer/InterfaceBottom/Container/AddStudentButton" to="." method="_on_add_student_button_pressed"]
[connection signal="pressed" from="VBoxContainer/InterfaceBottom/Container/PrintButton" to="." method="_on_button_pressed"]
+1 -12
View File
@@ -168,18 +168,6 @@ func add_device() -> bool:
return true
func delete_device(device_id : int) -> bool:
# Gets the list of students on the device
# Deletes students saves
# Removes the device
# Saves the settings
return true
func add_student(device_id : int, student_data : StudentData) -> bool:
if not teacher_settings:
return false
@@ -233,6 +221,7 @@ func delete_student(device_id : int, code : String) -> bool:
return true
# Student settings #
func get_student_folder() -> String: