Connects the register scene to the main menu. Makes register scene a little bit prettier
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
extends Control
|
||||
|
||||
const next_scene_path: = "res://sources/menus/login/login.tscn"
|
||||
const next_scene_path := "res://sources/menus/login/login.tscn"
|
||||
const register_scene_path := "res://sources/menus/register/register.tscn"
|
||||
|
||||
@onready var version_label : Label = $Informations/BuildVersionValue
|
||||
@onready var teacher_label : Label = $Informations/TeacherValue
|
||||
@@ -39,3 +40,7 @@ func _on_back_button_pressed():
|
||||
|
||||
func _on_login_in():
|
||||
get_tree().change_scene_to_file(next_scene_path)
|
||||
|
||||
|
||||
func _on_register_pressed():
|
||||
get_tree().change_scene_to_file(register_scene_path)
|
||||
|
||||
@@ -171,7 +171,7 @@ text = "Sign-in parent account
|
||||
"
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="CreateAccount" type="Button" parent="UserSelection/Form"]
|
||||
[node name="Register" type="Button" parent="UserSelection/Form"]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_top = 0.832
|
||||
@@ -397,6 +397,7 @@ vertical_alignment = 1
|
||||
|
||||
[connection signal="pressed" from="Kalulu/PlayButton" to="." method="_on_main_button_pressed"]
|
||||
[connection signal="pressed" from="UserSelection/Form/SignInTeacher" to="." method="_on_sign_in_teacher_pressed"]
|
||||
[connection signal="pressed" from="UserSelection/Form/Register" to="." method="_on_register_pressed"]
|
||||
[connection signal="logged_in" from="Login" to="." method="_on_login_in"]
|
||||
[connection signal="pressed" from="Login/InterfaceLeft/Container/BackButton" to="." method="_on_back_button_pressed"]
|
||||
[connection signal="pressed" from="Login/Form/ValidateButton" to="Login" method="_on_validate_button_pressed"]
|
||||
|
||||
@@ -15,11 +15,15 @@ extends Control
|
||||
|
||||
var current_steps : Array[Step]
|
||||
|
||||
@onready var kalulu := %Kalulu
|
||||
@onready var register_data := UserSettings.new() # TODO Change the resource
|
||||
@onready var progress_bar := %ProgressBar
|
||||
@onready var steps := %Steps
|
||||
|
||||
func _ready():
|
||||
|
||||
kalulu.play("Tc_Idle1")
|
||||
|
||||
current_steps = [account_type_step.instantiate()]
|
||||
_go_to_step(progress_bar.value)
|
||||
|
||||
@@ -99,9 +103,8 @@ func _on_step_completed(step : Step, values : Dictionary):
|
||||
|
||||
func _remove_future_steps():
|
||||
# Free memory
|
||||
for i in current_steps.size():
|
||||
if i > progress_bar.value:
|
||||
current_steps[i].queue_free()
|
||||
for i in range(progress_bar.value + 1, current_steps.size(), 1):
|
||||
current_steps[i].queue_free()
|
||||
|
||||
# Resize the array to remove unwanted steps
|
||||
current_steps.resize(progress_bar.value + 1)
|
||||
+26
-11
@@ -1,10 +1,13 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://b7cfjs2iipagq"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://b7cfjs2iipagq"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://wtx3wqs0l4si" path="res://assets/minigames/minigame_ui/graphic/button_back_up.png" id="1_g16n6"]
|
||||
[ext_resource type="Script" path="res://sources/menus/register/register_screen.gd" id="1_the3k"]
|
||||
[ext_resource type="Texture2D" uid="uid://cbhip35yyqneg" path="res://assets/minigames/minigame_ui/graphic/button_back_down.png" id="2_ufjlu"]
|
||||
[ext_resource type="Texture2D" uid="uid://tcapan0mj64o" path="res://assets/minigames/minigame_ui/graphic/button_back_disabled.png" id="3_svtfb"]
|
||||
[ext_resource type="Script" path="res://sources/menus/register/ProgressBar.gd" id="5_6e6tc"]
|
||||
[ext_resource type="Script" path="res://sources/menus/register/register.gd" id="1_jsnxc"]
|
||||
[ext_resource type="PackedScene" uid="uid://wdjp1sv55q4f" path="res://sources/menus/night_sky/night_sky.tscn" id="2_tirf6"]
|
||||
[ext_resource type="PackedScene" uid="uid://dxc82xcl7jncd" path="res://sources/menus/main/plants/palm.tscn" id="3_25mko"]
|
||||
[ext_resource type="PackedScene" uid="uid://dnuny6200v5b0" path="res://sources/kalulu.tscn" id="4_tnnid"]
|
||||
[ext_resource type="Texture2D" uid="uid://wtx3wqs0l4si" path="res://assets/minigames/minigame_ui/graphic/button_back_up.png" id="5_cac24"]
|
||||
[ext_resource type="Texture2D" uid="uid://cbhip35yyqneg" path="res://assets/minigames/minigame_ui/graphic/button_back_down.png" id="6_6v5qs"]
|
||||
[ext_resource type="Texture2D" uid="uid://tcapan0mj64o" path="res://assets/minigames/minigame_ui/graphic/button_back_disabled.png" id="7_hg5ef"]
|
||||
[ext_resource type="Script" path="res://sources/menus/register/ProgressBar.gd" id="8_h8kqu"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0rcyk"]
|
||||
border_width_left = 3
|
||||
@@ -24,7 +27,19 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_the3k")
|
||||
script = ExtResource("1_jsnxc")
|
||||
|
||||
[node name="NightSky" parent="." instance=ExtResource("2_tirf6")]
|
||||
layout_mode = 1
|
||||
|
||||
[node name="Palm" parent="." instance=ExtResource("3_25mko")]
|
||||
position = Vector2(1280, 1800)
|
||||
scale = Vector2(2, 2)
|
||||
|
||||
[node name="Kalulu" parent="." instance=ExtResource("4_tnnid")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(231, 1488)
|
||||
animation = &"Tc_Idle1"
|
||||
|
||||
[node name="ProgressBarContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 1
|
||||
@@ -46,9 +61,9 @@ unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(156, 156)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
texture_normal = ExtResource("1_g16n6")
|
||||
texture_pressed = ExtResource("2_ufjlu")
|
||||
texture_disabled = ExtResource("3_svtfb")
|
||||
texture_normal = ExtResource("5_cac24")
|
||||
texture_pressed = ExtResource("6_6v5qs")
|
||||
texture_disabled = ExtResource("7_hg5ef")
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="ProgressBar" type="ProgressBar" parent="ProgressBarContainer/HBoxContainer"]
|
||||
@@ -63,7 +78,7 @@ theme_override_styles/background = SubResource("StyleBoxFlat_0rcyk")
|
||||
theme_override_styles/fill = SubResource("StyleBoxFlat_bhfkq")
|
||||
max_value = 10.0
|
||||
step = 0.1
|
||||
script = ExtResource("5_6e6tc")
|
||||
script = ExtResource("8_h8kqu")
|
||||
|
||||
[node name="Steps" type="Control" parent="."]
|
||||
unique_name_in_owner = true
|
||||
@@ -12,8 +12,6 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_02ocl")
|
||||
step_name = null
|
||||
question = null
|
||||
|
||||
[node name="RightMargin" type="MarginContainer" parent="."]
|
||||
custom_minimum_size = Vector2(450, 2.08165e-12)
|
||||
@@ -97,16 +95,16 @@ script = ExtResource("3_mk32l")
|
||||
|
||||
[node name="FormContainer" type="VBoxContainer" parent="FormValidator/FormBinder"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(1624, 812)
|
||||
custom_minimum_size = Vector2(812, 812)
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -812.0
|
||||
offset_left = -406.0
|
||||
offset_top = -812.0
|
||||
offset_right = 812.0
|
||||
offset_right = 406.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
theme_override_constants/separation = 20
|
||||
|
||||
@@ -18,11 +18,10 @@ skip_validation = false
|
||||
rules = Array[Resource("res://addons/godot-form-validator/rules/validator_rule.gd")]([SubResource("Resource_kw8sn")])
|
||||
|
||||
[node name="PlayerStep" instance=ExtResource("1_ggdon")]
|
||||
step_name = ""
|
||||
question = "Enter the informations of player %d"
|
||||
|
||||
[node name="QuestionLabel" parent="PanelContainer/QuestionContainer" index="0"]
|
||||
text = "Enter the informations of student %d"
|
||||
text = "Enter the informations of player %d"
|
||||
|
||||
[node name="LevelContainer" type="VBoxContainer" parent="FormValidator/FormBinder/FormContainer" index="0"]
|
||||
layout_mode = 2
|
||||
|
||||
Reference in New Issue
Block a user