Files
Kalulu/sources/menus/main/main_menu.tscn
T

479 lines
16 KiB
Plaintext

[gd_scene load_steps=31 format=3 uid="uid://6v3nachs7j71"]
[ext_resource type="Script" path="res://sources/menus/main/main_menu.gd" id="1_0r1ij"]
[ext_resource type="PackedScene" uid="uid://wdjp1sv55q4f" path="res://sources/menus/components/night_sky/night_sky.tscn" id="1_afd4d"]
[ext_resource type="PackedScene" uid="uid://dxc82xcl7jncd" path="res://sources/menus/main/plants/palm.tscn" id="3_77rmy"]
[ext_resource type="PackedScene" uid="uid://dp4182l80ntvn" path="res://sources/menus/main/plants/flower.tscn" id="4_cdedv"]
[ext_resource type="PackedScene" uid="uid://dqtclljq6bvtg" path="res://sources/menus/main/plants/bush.tscn" id="4_onj68"]
[ext_resource type="PackedScene" uid="uid://nwur175781jf" path="res://sources/menus/main/plants/large_flower.tscn" id="6_bi65i"]
[ext_resource type="Texture2D" uid="uid://cgrl5x2iqbiwg" path="res://assets/menus/main/title.png" id="7_ftt26"]
[ext_resource type="Texture2D" uid="uid://cgwun1jhj53bi" path="res://assets/menus/main/play_button.png" id="7_lr7j4"]
[ext_resource type="Script" path="res://sources/menus/main/kalulu.gd" id="8_cxg8l"]
[ext_resource type="PackedScene" uid="uid://dnuny6200v5b0" path="res://sources/kalulu.tscn" id="10_icqmp"]
[ext_resource type="Script" path="res://sources/menus/main/login.gd" id="12_6bu7q"]
[ext_resource type="Texture2D" uid="uid://wtx3wqs0l4si" path="res://assets/minigames/minigame_ui/graphic/button_back_up.png" id="13_j3nb7"]
[ext_resource type="Script" path="res://sources/menus/main/language_field.gd" id="13_rs3hd"]
[ext_resource type="Texture2D" uid="uid://cbhip35yyqneg" path="res://assets/minigames/minigame_ui/graphic/button_back_down.png" id="14_3lr3g"]
[ext_resource type="Script" path="res://addons/godot-form-validator/form_validator.gd" id="15_e88oj"]
[ext_resource type="Theme" uid="uid://dqjvrt5nrtwn1" path="res://resources/themes/kalulu_theme.tres" id="15_pcmnw"]
[ext_resource type="Theme" uid="uid://cd7ftmo5x4c2r" path="res://resources/themes/kalulu_theme_big.tres" id="16_bq28s"]
[ext_resource type="Script" path="res://addons/godot-form-validator/control_validator.gd" id="18_iunlb"]
[ext_resource type="Script" path="res://addons/godot-form-validator/rules/required_rule.gd" id="19_o524c"]
[ext_resource type="Script" path="res://addons/godot-form-validator/validators/range_validator.gd" id="20_6xsd1"]
[ext_resource type="Script" path="res://addons/godot-form-validator/rules/email_rule.gd" id="20_jk8lq"]
[ext_resource type="Texture2D" uid="uid://bbip3wpyidt1q" path="res://assets/menus/main/play_button_mask.png" id="20_oqrk5"]
[ext_resource type="Script" path="res://addons/godot-form-validator/validators/line_edit_validator.gd" id="21_1bl4i"]
[sub_resource type="Resource" id="Resource_mh75v"]
script = ExtResource("19_o524c")
fail_message = "A value is required."
[sub_resource type="Resource" id="Resource_owox8"]
script = ExtResource("20_6xsd1")
validation_order = 1
validation_method = 1
skip_validation = false
rules = Array[Resource("res://addons/godot-form-validator/rules/validator_rule.gd")]([SubResource("Resource_mh75v")])
[sub_resource type="Resource" id="Resource_j516d"]
script = ExtResource("19_o524c")
fail_message = "A value is required."
[sub_resource type="Resource" id="Resource_ayewh"]
script = ExtResource("20_jk8lq")
fail_message = "Value must be a valid email address."
[sub_resource type="Resource" id="Resource_hxkvx"]
script = ExtResource("21_1bl4i")
validation_order = 1
validation_method = 1
skip_validation = false
rules = Array[Resource("res://addons/godot-form-validator/rules/validator_rule.gd")]([SubResource("Resource_j516d"), SubResource("Resource_ayewh")])
[sub_resource type="Resource" id="Resource_b08p8"]
script = ExtResource("19_o524c")
fail_message = "A value is required."
[sub_resource type="Resource" id="Resource_k2y4u"]
script = ExtResource("21_1bl4i")
validation_order = 1
validation_method = 1
skip_validation = false
rules = Array[Resource("res://addons/godot-form-validator/rules/validator_rule.gd")]([SubResource("Resource_b08p8")])
[node name="MainMenu" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_0r1ij")
[node name="Background" parent="." instance=ExtResource("1_afd4d")]
layout_mode = 1
[node name="Plants" type="Control" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="PalmTop" parent="Plants" instance=ExtResource("3_77rmy")]
position = Vector2(500, 1096)
scale = Vector2(2, 2)
[node name="PalmBottom" parent="Plants" instance=ExtResource("3_77rmy")]
light_mask = 0
position = Vector2(1620, 1800)
scale = Vector2(2, 2)
[node name="Bush" parent="Plants" instance=ExtResource("4_onj68")]
position = Vector2(730, 1824)
scale = Vector2(2, 2)
[node name="Flower" parent="Plants" instance=ExtResource("4_cdedv")]
position = Vector2(330, 1800)
scale = Vector2(2, 2)
[node name="LargeFlower" parent="Plants" instance=ExtResource("6_bi65i")]
position = Vector2(2000, 1875)
scale = Vector2(2, 2)
[node name="Kalulu" type="Control" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("8_cxg8l")
[node name="Title" type="TextureRect" parent="Kalulu"]
layout_mode = 2
offset_left = -324.0
offset_top = -644.0
offset_right = 323.0
offset_bottom = -472.0
grow_horizontal = 2
size_flags_horizontal = 4
size_flags_vertical = 0
texture = ExtResource("7_ftt26")
[node name="Background" type="TextureRect" parent="Kalulu"]
custom_minimum_size = Vector2(868, 868)
layout_mode = 2
offset_left = -434.0
offset_top = -250.0
offset_right = 434.0
offset_bottom = 618.0
grow_horizontal = 2
grow_vertical = 0
size_flags_horizontal = 4
size_flags_vertical = 8
texture = ExtResource("7_lr7j4")
[node name="Sprite" parent="Kalulu" instance=ExtResource("10_icqmp")]
position = Vector2(0, -6.10352e-05)
scale = Vector2(2, 2)
animation = &"Tc_Idle1"
[node name="Light" type="PointLight2D" parent="Kalulu"]
position = Vector2(-5, 377)
scale = Vector2(2.26133, 2.05467)
energy = 1.15
blend_mode = 2
range_item_cull_mask = 2
texture = ExtResource("20_oqrk5")
[node name="PlayButton" type="Button" parent="Kalulu"]
modulate = Color(1, 1, 1, 0)
self_modulate = Color(1, 1, 1, 0)
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -1280.0
offset_top = -904.0
offset_right = 1280.0
offset_bottom = 904.0
grow_horizontal = 2
grow_vertical = 2
[node name="SpeechPlayer" type="AudioStreamPlayer" parent="Kalulu"]
[node name="UserSelection" type="Control" parent="."]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Form" type="VBoxContainer" parent="UserSelection"]
custom_minimum_size = Vector2(850, 300)
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -425.0
offset_top = -160.0
offset_right = 425.0
offset_bottom = 160.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 25
[node name="LanguageContainer" type="VBoxContainer" parent="UserSelection/Form"]
layout_mode = 2
theme_override_constants/separation = 0
[node name="LanguageLabel" type="Label" parent="UserSelection/Form/LanguageContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 70
text = "LANGUAGE"
[node name="LanguageField" type="OptionButton" parent="UserSelection/Form/LanguageContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_type_variation = &"Combobox"
theme_override_font_sizes/font_size = 70
script = ExtResource("13_rs3hd")
[node name="SignInTeacher" type="Button" parent="UserSelection/Form"]
layout_mode = 2
theme_override_font_sizes/font_size = 70
text = "SIGN_IN_TEACHER"
metadata/_edit_use_anchors_ = true
[node name="SignInParent" type="Button" parent="UserSelection/Form"]
layout_mode = 2
theme_override_font_sizes/font_size = 70
text = "SIGN_IN_PARENT"
metadata/_edit_use_anchors_ = true
[node name="Register" type="Button" parent="UserSelection/Form"]
layout_mode = 2
theme_override_font_sizes/font_size = 70
text = "CREATE_ACCOUNT"
metadata/_edit_use_anchors_ = true
[node name="LoginForm" type="Control" parent="."]
unique_name_in_owner = true
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("12_6bu7q")
[node name="TeacherLabel" type="Label" parent="LoginForm"]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
offset_top = 168.0
offset_bottom = 286.0
grow_horizontal = 2
theme_override_font_sizes/font_size = 90
text = "SIGN_IN_TEACHER"
horizontal_alignment = 1
vertical_alignment = 1
[node name="ParentLabel" type="Label" parent="LoginForm"]
unique_name_in_owner = true
visible = false
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
offset_top = 168.0
offset_bottom = 286.0
grow_horizontal = 2
theme_override_font_sizes/font_size = 90
text = "SIGN_IN_PARENT"
horizontal_alignment = 1
vertical_alignment = 1
[node name="LoginFormValidator" type="Control" parent="LoginForm"]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("15_e88oj")
[node name="FormContainer" type="VBoxContainer" parent="LoginForm/LoginFormValidator"]
custom_minimum_size = Vector2(1000, 0)
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -500.0
offset_top = -406.0
offset_right = 500.0
offset_bottom = 406.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 25
alignment = 1
[node name="DeviceIDContainer" type="VBoxContainer" parent="LoginForm/LoginFormValidator/FormContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_constants/separation = 0
[node name="DeviceIDLabel" type="Label" parent="LoginForm/LoginFormValidator/FormContainer/DeviceIDContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 70
text = "DEVICE_ID"
[node name="DeviceIDField" type="SpinBox" parent="LoginForm/LoginFormValidator/FormContainer/DeviceIDContainer"]
unique_name_in_owner = true
layout_mode = 2
theme = ExtResource("16_bq28s")
min_value = 1.0
max_value = 6.0
value = 1.0
rounded = true
metadata/_edit_use_anchors_ = true
[node name="DeviceIDValidator" type="Node" parent="LoginForm/LoginFormValidator/FormContainer/DeviceIDContainer/DeviceIDField"]
script = ExtResource("18_iunlb")
validator = SubResource("Resource_owox8")
[node name="DeviceIDFieldError" type="Label" parent="LoginForm/LoginFormValidator/FormContainer/DeviceIDContainer"]
visible = false
layout_mode = 2
[node name="EmailContainer" type="VBoxContainer" parent="LoginForm/LoginFormValidator/FormContainer"]
layout_mode = 2
theme_override_constants/separation = 0
[node name="EmailLabel" type="Label" parent="LoginForm/LoginFormValidator/FormContainer/EmailContainer"]
layout_mode = 2
theme = ExtResource("15_pcmnw")
theme_override_font_sizes/font_size = 70
text = "LOGIN"
[node name="EmailField" type="LineEdit" parent="LoginForm/LoginFormValidator/FormContainer/EmailContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_type_variation = &"1"
theme_override_font_sizes/font_size = 70
placeholder_text = "EMAIL"
[node name="EmailValidator" type="Node" parent="LoginForm/LoginFormValidator/FormContainer/EmailContainer/EmailField"]
script = ExtResource("18_iunlb")
validator = SubResource("Resource_hxkvx")
[node name="EmailFieldError" type="Label" parent="LoginForm/LoginFormValidator/FormContainer/EmailContainer"]
visible = false
layout_mode = 2
[node name="PasswordContainer" type="VBoxContainer" parent="LoginForm/LoginFormValidator/FormContainer"]
layout_mode = 2
theme_override_constants/separation = 0
[node name="PasswordField" type="LineEdit" parent="LoginForm/LoginFormValidator/FormContainer/PasswordContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_font_sizes/font_size = 70
placeholder_text = "PASSWORD"
secret = true
[node name="PasswordValidator" type="Node" parent="LoginForm/LoginFormValidator/FormContainer/PasswordContainer/PasswordField"]
script = ExtResource("18_iunlb")
validator = SubResource("Resource_k2y4u")
[node name="PasswordFieldError" type="Label" parent="LoginForm/LoginFormValidator/FormContainer/PasswordContainer"]
visible = false
layout_mode = 2
[node name="ValidateButton" type="Button" parent="LoginForm/LoginFormValidator/FormContainer"]
layout_mode = 2
size_flags_vertical = 8
theme_override_font_sizes/font_size = 70
text = "LOG_IN"
[node name="LoginError" type="Label" parent="LoginForm/LoginFormValidator/FormContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
text = "INVALID_EMAIL_OR_PASSWORD"
[node name="InterfaceLeft" type="MarginContainer" parent="."]
unique_name_in_owner = true
visible = false
custom_minimum_size = Vector2(450, 0)
layout_mode = 1
anchors_preset = 9
anchor_bottom = 1.0
offset_right = 450.0
grow_vertical = 2
theme_override_constants/margin_left = 50
theme_override_constants/margin_top = 50
theme_override_constants/margin_right = 50
theme_override_constants/margin_bottom = 50
[node name="Container" type="VBoxContainer" parent="InterfaceLeft"]
layout_mode = 2
[node name="BackButton" type="TextureButton" parent="InterfaceLeft/Container"]
layout_mode = 2
size_flags_vertical = 3
texture_normal = ExtResource("13_j3nb7")
texture_pressed = ExtResource("14_3lr3g")
stretch_mode = 4
[node name="Informations" type="Control" parent="."]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -176.0
offset_right = 624.0
grow_vertical = 0
[node name="BuildVersionTitle" type="Label" parent="Informations"]
layout_mode = 2
offset_left = 10.0
offset_right = 261.0
offset_bottom = 56.0
theme_override_font_sizes/font_size = 30
text = "BUILD_VERSION"
vertical_alignment = 1
[node name="BuildVersionValue" type="Label" parent="Informations"]
layout_mode = 1
offset_left = 250.0
offset_right = 400.0
offset_bottom = 56.0
theme_override_font_sizes/font_size = 30
text = "?"
vertical_alignment = 1
[node name="TeacherTitle" type="Label" parent="Informations"]
layout_mode = 0
offset_left = 10.0
offset_top = 56.0
offset_right = 261.0
offset_bottom = 112.0
theme_override_font_sizes/font_size = 30
text = "LOGGED_AS"
vertical_alignment = 1
[node name="TeacherValue" type="Label" parent="Informations"]
layout_mode = 1
offset_left = 250.0
offset_top = 56.0
offset_right = 500.0
offset_bottom = 112.0
theme_override_font_sizes/font_size = 30
text = "?"
vertical_alignment = 1
[node name="DeviceIDTitle" type="Label" parent="Informations"]
layout_mode = 1
offset_left = 10.0
offset_top = 112.0
offset_right = 261.0
offset_bottom = 168.0
theme_override_font_sizes/font_size = 30
text = "DEVICE_ID"
vertical_alignment = 1
[node name="DeviceIDValue" type="Label" parent="Informations"]
layout_mode = 1
offset_left = 250.0
offset_top = 112.0
offset_right = 400.0
offset_bottom = 168.0
theme_override_font_sizes/font_size = 30
text = "?"
vertical_alignment = 1
[connection signal="pressed" from="Kalulu/PlayButton" to="." method="_on_main_button_pressed"]
[connection signal="item_selected" from="UserSelection/Form/LanguageContainer/LanguageField" to="UserSelection/Form/LanguageContainer/LanguageField" method="_on_item_selected"]
[connection signal="pressed" from="UserSelection/Form/SignInTeacher" to="." method="_on_sign_in_teacher_pressed"]
[connection signal="pressed" from="UserSelection/Form/SignInParent" to="." method="_on_sign_in_parent_pressed"]
[connection signal="pressed" from="UserSelection/Form/Register" to="." method="_on_register_pressed"]
[connection signal="logged_in" from="LoginForm" to="." method="_on_login_in"]
[connection signal="control_validated" from="LoginForm/LoginFormValidator" to="LoginForm" method="_on_login_form_validator_control_validated"]
[connection signal="pressed" from="LoginForm/LoginFormValidator/FormContainer/ValidateButton" to="LoginForm" method="_on_validate_button_pressed"]
[connection signal="pressed" from="InterfaceLeft/Container/BackButton" to="." method="_on_back_button_pressed"]