Implementation: Login/Register UI wired to /api/auth #35
@@ -29,6 +29,92 @@ text = "AGP Game"
|
||||
horizontal_alignment = 1
|
||||
theme_override_font_sizes/font_size = 72
|
||||
|
||||
[node name="AuthTabContainer" type="TabContainer" parent="CenterContainer/VBoxContainer"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 4
|
||||
tabs = "Login\0Register"
|
||||
|
||||
[node name="LoginPanel" type="VBoxContainer" parent="CenterContainer/VBoxContainer/AuthTabContainer"]
|
||||
layout_mode = 1
|
||||
theme_override_constants/separation = 8
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="LoginUsernameLabel" type="Label" parent="CenterContainer/VBoxContainer/AuthTabContainer/LoginPanel"]
|
||||
layout_mode = 1
|
||||
text = "Username"
|
||||
|
||||
[node name="LoginUsername" type="LineEdit" parent="CenterContainer/VBoxContainer/AuthTabContainer/LoginPanel"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 4
|
||||
placeholder_text = "Username"
|
||||
|
||||
[node name="LoginPassword" type="LineEdit" parent="CenterContainer/VBoxContainer/AuthTabContainer/LoginPanel"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 4
|
||||
placeholder_text = "Password"
|
||||
secret = true
|
||||
|
||||
[node name="LoginButton" type="Button" parent="CenterContainer/VBoxContainer/AuthTabContainer/LoginPanel"]
|
||||
layout_mode = 1
|
||||
text = "Login"
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="RegisterPanel" type="VBoxContainer" parent="CenterContainer/VBoxContainer/AuthTabContainer"]
|
||||
layout_mode = 1
|
||||
theme_override_constants/separation = 8
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="RegUsernameLabel" type="Label" parent="CenterContainer/VBoxContainer/AuthTabContainer/RegisterPanel"]
|
||||
layout_mode = 1
|
||||
text = "Username"
|
||||
|
||||
[node name="RegUsername" type="LineEdit" parent="CenterContainer/VBoxContainer/AuthTabContainer/RegisterPanel"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 4
|
||||
placeholder_text = "Username"
|
||||
|
||||
[node name="RegEmailLabel" type="Label" parent="CenterContainer/VBoxContainer/AuthTabContainer/RegisterPanel"]
|
||||
layout_mode = 1
|
||||
text = "Email"
|
||||
|
||||
[node name="RegEmail" type="LineEdit" parent="CenterContainer/VBoxContainer/AuthTabContainer/RegisterPanel"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 4
|
||||
placeholder_text = "Email"
|
||||
|
||||
[node name="RegPassword" type="LineEdit" parent="CenterContainer/VBoxContainer/AuthTabContainer/RegisterPanel"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 4
|
||||
placeholder_text = "Password"
|
||||
secret = true
|
||||
|
||||
[node name="RegDobLabel" type="Label" parent="CenterContainer/VBoxContainer/AuthTabContainer/RegisterPanel"]
|
||||
layout_mode = 1
|
||||
text = "Date of Birth (YYYY-MM-DD)"
|
||||
|
||||
[node name="RegDob" type="LineEdit" parent="CenterContainer/VBoxContainer/AuthTabContainer/RegisterPanel"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 4
|
||||
placeholder_text = "YYYY-MM-DD"
|
||||
|
||||
[node name="RegisterButton" type="Button" parent="CenterContainer/VBoxContainer/AuthTabContainer/RegisterPanel"]
|
||||
layout_mode = 1
|
||||
text = "Register"
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="ErrorLabel" type="Label" parent="CenterContainer/VBoxContainer"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 4
|
||||
text = ""
|
||||
font_color = Color(1, 0, 0, 1)
|
||||
visible = false
|
||||
|
||||
[node name="UserInfoLabel" type="Label" parent="CenterContainer/VBoxContainer"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 4
|
||||
text = ""
|
||||
visible = false
|
||||
|
||||
[node name="PlayButton" type="Button" parent="CenterContainer/VBoxContainer"]
|
||||
layout_mode = 1
|
||||
text = "Play"
|
||||
@@ -39,5 +125,10 @@ layout_mode = 1
|
||||
text = "Quit"
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[connection signal="pressed" from="CenterContainer/VBoxContainer/AuthTabContainer/LoginPanel/LoginButton" to="CenterContainer/VBoxContainer/AuthTabContainer" method="_on_login_button_pressed"]
|
||||
[connection signal="pressed" from="CenterContainer/VBoxContainer/AuthTabContainer/RegisterPanel/RegisterButton" to="CenterContainer/VBoxContainer/AuthTabContainer" method="_on_register_button_pressed"]
|
||||
[connection signal="pressed" from="CenterContainer/VBoxContainer/PlayButton" to="." method="_on_play_button_pressed"]
|
||||
[connection signal="pressed" from="CenterContainer/VBoxContainer/QuitButton" to="." method="_on_quit_button_pressed"]
|
||||
[connection signal="text_submitted" from="CenterContainer/VBoxContainer/AuthTabContainer/LoginPanel/LoginUsername" to="CenterContainer/VBoxContainer/AuthTabContainer/LoginPanel/LoginButton" method="_on_login_button_pressed"]
|
||||
[connection signal="text_submitted" from="CenterContainer/VBoxContainer/AuthTabContainer/LoginPanel/LoginPassword" to="CenterContainer/VBoxContainer/AuthTabContainer/LoginPanel/LoginButton" method="_on_login_button_pressed"]
|
||||
[connection signal="text_submitted" from="CenterContainer/VBoxContainer/AuthTabContainer/RegisterPanel/RegDob" to="CenterContainer/VBoxContainer/AuthTabContainer/RegisterPanel/RegisterButton" method="_on_register_button_pressed"]
|
||||
|
||||
Reference in New Issue
Block a user