[gd_scene load_steps=5 format=3 uid="uid://fmp1tah03kew"]

[ext_resource type="Script" path="res://scenes/UI/login_screen.gd" id="1_jqkpi"]
[ext_resource type="Texture2D" uid="uid://dhuosr0p605gj" path="res://assets/images/pp_start_bg.png" id="2_2n6di"]
[ext_resource type="Theme" uid="uid://tn8qndst18d6" path="res://themes/title_font_theme.tres" id="3_c4k70"]
[ext_resource type="Theme" uid="uid://wpxmub0n2dr3" path="res://themes/button_theme.tres" id="4_gx673"]

[node name="LoginScreen" 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_jqkpi")

[node name="TextureRect" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_2n6di")

[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 80
theme_override_constants/margin_top = 40
theme_override_constants/margin_right = 80
theme_override_constants/margin_bottom = 40

[node name="ContentCenter" type="CenterContainer" parent="MarginContainer"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="ContentVBox" type="VBoxContainer" parent="MarginContainer/ContentCenter"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
theme_override_constants/separation = 24

[node name="TitleLabel" type="Label" parent="MarginContainer/ContentCenter/ContentVBox"]
layout_mode = 2
size_flags_horizontal = 4
theme = ExtResource("3_c4k70")
text = "ACCOUNT LOGIN"
horizontal_alignment = 1

[node name="FormVBox" type="VBoxContainer" parent="MarginContainer/ContentCenter/ContentVBox"]
layout_mode = 2
size_flags_horizontal = 4
theme_override_constants/separation = 8
custom_minimum_size = Vector2(480, 0)

[node name="UsernameLabel" type="Label" parent="MarginContainer/ContentCenter/ContentVBox/FormVBox"]
layout_mode = 2
text = "Username"

[node name="UsernameInput" type="LineEdit" parent="MarginContainer/ContentCenter/ContentVBox/FormVBox"]
unique_name_in_owner = true
layout_mode = 2
placeholder_text = "enter username"
caret_blink = true

[node name="PasswordLabel" type="Label" parent="MarginContainer/ContentCenter/ContentVBox/FormVBox"]
layout_mode = 2
text = "Password"

[node name="PasswordInput" type="LineEdit" parent="MarginContainer/ContentCenter/ContentVBox/FormVBox"]
unique_name_in_owner = true
layout_mode = 2
placeholder_text = "enter password"
secret = true

[node name="ButtonVBox" type="VBoxContainer" parent="MarginContainer/ContentCenter/ContentVBox"]
layout_mode = 2
size_flags_horizontal = 4
theme_override_constants/separation = 12

[node name="ErrorLabel" type="Label" parent="MarginContainer/ContentCenter/ContentVBox/ButtonVBox"]
unique_name_in_owner = true
layout_mode = 2
theme = ExtResource("3_c4k70")
horizontal_alignment = 1
theme_override_font_sizes/font_size = 26
theme_override_colors/font_color = Color(1, 0.2, 0.2, 1)

[node name="LogInButton" type="Button" parent="MarginContainer/ContentCenter/ContentVBox/ButtonVBox"]
layout_mode = 2
size_flags_horizontal = 4
theme = ExtResource("4_gx673")
text = "LOG IN"
text_alignment = 1

[node name="BackButton" type="Button" parent="MarginContainer/ContentCenter/ContentVBox/ButtonVBox"]
layout_mode = 2
size_flags_horizontal = 4
theme = ExtResource("4_gx673")
text = "BACK"
text_alignment = 1

[node name="LoginRequest" type="HTTPRequest" parent="."]
unique_name_in_owner = true

[connection signal="pressed" from="MarginContainer/ContentCenter/ContentVBox/ButtonVBox/LogInButton" to="." method="_on_log_in_button_pressed"]
[connection signal="pressed" from="MarginContainer/ContentCenter/ContentVBox/ButtonVBox/BackButton" to="." method="_on_back_button_pressed"]
[connection signal="request_completed" from="LoginRequest" to="." method="_on_login_request_completed"]
