Files
MahjongGame/Login.tscn
T

491 lines
14 KiB
Plaintext

[gd_scene load_steps=30 format=2]
[ext_resource path="res://Asset/LoginBackgounnd.png" type="Texture" id=1]
[ext_resource path="res://Asset/Font/SourceHanSansSC-Normal.otf" type="DynamicFontData" id=2]
[ext_resource path="res://Asset/Button/General/Register.png" type="Texture" id=3]
[ext_resource path="res://Asset/Button/General/Login.png" type="Texture" id=4]
[ext_resource path="res://Login.gd" type="Script" id=5]
[ext_resource path="res://Asset/PopupBackground.png" type="Texture" id=6]
[ext_resource path="res://Asset/Input/InputShort.png" type="Texture" id=7]
[ext_resource path="res://lineedit_style.tres" type="StyleBox" id=8]
[ext_resource path="res://Asset/Button/General/RadioNormal.png" type="Texture" id=9]
[ext_resource path="res://Asset/Button/General/RadioSelect.png" type="Texture" id=10]
[ext_resource path="res://Asset/Button/General/Confirm.png" type="Texture" id=11]
[sub_resource type="StyleBoxTexture" id=1]
texture = ExtResource( 6 )
region_rect = Rect2( 0, 0, 640, 569 )
[sub_resource type="DynamicFont" id=2]
size = 72
font_data = ExtResource( 2 )
[sub_resource type="StyleBoxTexture" id=3]
texture = ExtResource( 7 )
region_rect = Rect2( 0, 0, 257, 59 )
[sub_resource type="StyleBoxTexture" id=4]
texture = ExtResource( 7 )
region_rect = Rect2( 0, 0, 257, 59 )
[sub_resource type="DynamicFont" id=5]
size = 72
font_data = ExtResource( 2 )
[sub_resource type="DynamicFont" id=6]
size = 72
font_data = ExtResource( 2 )
[sub_resource type="DynamicFont" id=7]
size = 72
font_data = ExtResource( 2 )
[sub_resource type="DynamicFont" id=8]
size = 64
font_data = ExtResource( 2 )
[sub_resource type="ButtonGroup" id=9]
[sub_resource type="StreamTexture" id=10]
flags = 4
load_path = "res://.import/RadioSelect.png-9fa6b8f56f1a88ae34b11e74ec2554de.stex"
[sub_resource type="StreamTexture" id=11]
flags = 4
load_path = "res://.import/RadioNormal.png-11ab88ef6fe2e65a4d5b3a4e5e51d8b4.stex"
[sub_resource type="DynamicFont" id=12]
size = 64
font_data = ExtResource( 2 )
[sub_resource type="StyleBoxTexture" id=13]
texture = ExtResource( 6 )
region_rect = Rect2( 0, 0, 640, 569 )
[sub_resource type="DynamicFont" id=14]
size = 72
font_data = ExtResource( 2 )
[sub_resource type="StyleBoxTexture" id=15]
texture = ExtResource( 6 )
region_rect = Rect2( 0, 0, 640, 569 )
[sub_resource type="DynamicFont" id=16]
size = 72
font_data = ExtResource( 2 )
[sub_resource type="StyleBoxTexture" id=17]
texture = ExtResource( 6 )
region_rect = Rect2( 0, 0, 640, 569 )
[sub_resource type="DynamicFont" id=18]
size = 48
font_data = ExtResource( 2 )
[node name="Node2D" type="Node2D"]
script = ExtResource( 5 )
[node name="TextureRect" type="TextureRect" parent="."]
margin_right = 1920.0
margin_bottom = 1080.0
texture = ExtResource( 1 )
expand = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxContainer" type="HBoxContainer" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = 670.0
margin_top = 827.761
margin_right = 1115.0
margin_bottom = 912.761
rect_scale = Vector2( 1.3, 1.3 )
alignment = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="LoginButton" type="TextureButton" parent="HBoxContainer"]
margin_right = 228.0
margin_bottom = 85.0
texture_normal = ExtResource( 4 )
[node name="SignupButton" type="TextureButton" parent="HBoxContainer"]
margin_left = 236.0
margin_right = 445.0
margin_bottom = 85.0
texture_normal = ExtResource( 3 )
[node name="RegisterDialog" type="PopupDialog" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = 558.156
margin_top = 373.135
margin_right = 1358.16
margin_bottom = 1023.14
custom_styles/panel = SubResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="RegisterDialog"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -269.0
margin_top = -269.0
margin_right = 269.0
margin_bottom = 269.0
alignment = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GridContainer" type="GridContainer" parent="RegisterDialog/VBoxContainer"]
margin_right = 538.0
margin_bottom = 455.0
custom_constants/vseparation = 10
custom_constants/hseparation = 10
columns = 2
__meta__ = {
"_edit_use_anchors_": false
}
[node name="UsernameLabel" type="Label" parent="RegisterDialog/VBoxContainer/GridContainer"]
margin_right = 144.0
margin_bottom = 105.0
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "账号"
[node name="UsernameEdit" type="LineEdit" parent="RegisterDialog/VBoxContainer/GridContainer"]
margin_left = 154.0
margin_right = 538.0
margin_bottom = 105.0
custom_styles/focus = SubResource( 3 )
custom_styles/normal = SubResource( 4 )
custom_fonts/font = SubResource( 5 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
align = 1
[node name="PasswordLabel" type="Label" parent="RegisterDialog/VBoxContainer/GridContainer"]
margin_top = 115.0
margin_right = 144.0
margin_bottom = 220.0
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "密码"
[node name="PasswordEdit" type="LineEdit" parent="RegisterDialog/VBoxContainer/GridContainer"]
margin_left = 154.0
margin_top = 115.0
margin_right = 538.0
margin_bottom = 220.0
custom_styles/focus = ExtResource( 8 )
custom_styles/normal = ExtResource( 8 )
custom_fonts/font = SubResource( 6 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
align = 1
secret = true
[node name="NicknameLabel" type="Label" parent="RegisterDialog/VBoxContainer/GridContainer"]
margin_top = 230.0
margin_right = 144.0
margin_bottom = 335.0
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "昵称"
[node name="NicknameEdit" type="LineEdit" parent="RegisterDialog/VBoxContainer/GridContainer"]
margin_left = 154.0
margin_top = 230.0
margin_right = 538.0
margin_bottom = 335.0
custom_styles/focus = ExtResource( 8 )
custom_styles/normal = ExtResource( 8 )
custom_fonts/font = SubResource( 7 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
align = 1
[node name="GenderLabel" type="Label" parent="RegisterDialog/VBoxContainer/GridContainer"]
margin_top = 347.0
margin_right = 144.0
margin_bottom = 452.0
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "性别"
[node name="GenderContainer" type="HBoxContainer" parent="RegisterDialog/VBoxContainer/GridContainer"]
margin_left = 154.0
margin_top = 345.0
margin_right = 538.0
margin_bottom = 455.0
[node name="MaleCheckBox" type="CheckBox" parent="RegisterDialog/VBoxContainer/GridContainer/GenderContainer"]
margin_right = 168.0
margin_bottom = 110.0
custom_icons/radio_checked = ExtResource( 10 )
custom_icons/radio_unchecked = ExtResource( 9 )
custom_fonts/font = SubResource( 8 )
custom_colors/font_color_disabled = Color( 0, 0, 0, 1 )
custom_colors/font_color_hover_pressed = Color( 0, 0, 0, 1 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_colors/font_color_hover = Color( 0, 0, 0, 1 )
custom_colors/font_color_pressed = Color( 0, 0, 0, 1 )
group = SubResource( 9 )
text = "男"
[node name="FemaleCheckBox" type="CheckBox" parent="RegisterDialog/VBoxContainer/GridContainer/GenderContainer"]
margin_left = 176.0
margin_right = 344.0
margin_bottom = 110.0
custom_icons/radio_checked = SubResource( 10 )
custom_icons/radio_unchecked = SubResource( 11 )
custom_fonts/font = SubResource( 12 )
custom_colors/font_color_disabled = Color( 0, 0, 0, 1 )
custom_colors/font_color_hover_pressed = Color( 0, 0, 0, 1 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_colors/font_color_hover = Color( 0, 0, 0, 1 )
custom_colors/font_color_pressed = Color( 0, 0, 0, 1 )
group = SubResource( 9 )
text = "女"
[node name="HBoxContainer" type="HBoxContainer" parent="RegisterDialog/VBoxContainer"]
margin_top = 463.0
margin_right = 538.0
margin_bottom = 538.0
alignment = 1
[node name="RegisterConfirmButton" type="TextureButton" parent="RegisterDialog/VBoxContainer/HBoxContainer"]
margin_left = 158.0
margin_right = 379.0
margin_bottom = 75.0
texture_normal = ExtResource( 11 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="LoginPanel" type="PopupDialog" parent="."]
margin_right = 800.0
margin_bottom = 500.0
custom_styles/panel = SubResource( 13 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="LoginPanel"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -269.0
margin_top = -177.5
margin_right = 269.0
margin_bottom = 177.5
custom_constants/separation = 40
alignment = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GridContainer" type="GridContainer" parent="LoginPanel/VBoxContainer"]
margin_right = 538.0
margin_bottom = 240.0
custom_constants/vseparation = 30
custom_constants/hseparation = 10
columns = 2
__meta__ = {
"_edit_use_anchors_": false
}
[node name="UserNameLabel" type="Label" parent="LoginPanel/VBoxContainer/GridContainer"]
margin_right = 144.0
margin_bottom = 105.0
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "账号"
align = 1
[node name="UsernameEdit" type="LineEdit" parent="LoginPanel/VBoxContainer/GridContainer"]
margin_left = 154.0
margin_right = 538.0
margin_bottom = 105.0
rect_min_size = Vector2( 248, 0 )
custom_styles/focus = ExtResource( 8 )
custom_styles/normal = ExtResource( 8 )
custom_fonts/font = SubResource( 14 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
align = 1
[node name="PasswordLabel" type="Label" parent="LoginPanel/VBoxContainer/GridContainer"]
margin_top = 135.0
margin_right = 144.0
margin_bottom = 240.0
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "密码"
align = 1
[node name="PasswordEdit" type="LineEdit" parent="LoginPanel/VBoxContainer/GridContainer"]
margin_left = 154.0
margin_top = 135.0
margin_right = 538.0
margin_bottom = 240.0
custom_styles/focus = ExtResource( 8 )
custom_styles/normal = ExtResource( 8 )
custom_fonts/font = SubResource( 14 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
align = 1
[node name="HBoxContainer" type="HBoxContainer" parent="LoginPanel/VBoxContainer"]
margin_top = 280.0
margin_right = 538.0
margin_bottom = 355.0
alignment = 1
[node name="LoginConfirmButton" type="TextureButton" parent="LoginPanel/VBoxContainer/HBoxContainer"]
margin_left = 158.0
margin_right = 379.0
margin_bottom = 75.0
grow_horizontal = 0
texture_normal = ExtResource( 11 )
[node name="LoginHTTPRequest" type="HTTPRequest" parent="."]
[node name="RegisterHTTPRequest" type="HTTPRequest" parent="."]
[node name="LoginFailedPanel" type="PopupDialog" parent="."]
margin_right = 700.0
margin_bottom = 500.0
custom_styles/panel = SubResource( 15 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxContainer" type="VBoxContainer" parent="LoginFailedPanel"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -288.0
margin_top = -115.0
margin_right = 288.0
margin_bottom = 115.0
custom_constants/separation = 50
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="LoginFailedPanel/HBoxContainer"]
margin_right = 576.0
margin_bottom = 105.0
custom_fonts/font = SubResource( 16 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "用户名或密码错误"
[node name="HBoxContainer" type="HBoxContainer" parent="LoginFailedPanel/HBoxContainer"]
margin_top = 155.0
margin_right = 576.0
margin_bottom = 230.0
alignment = 1
[node name="ConfirmButton" type="TextureButton" parent="LoginFailedPanel/HBoxContainer/HBoxContainer"]
margin_left = 177.0
margin_right = 398.0
margin_bottom = 75.0
texture_normal = ExtResource( 11 )
[node name="NetWorkErrDialog" type="PopupDialog" parent="."]
margin_right = 700.0
margin_bottom = 500.0
custom_styles/panel = SubResource( 15 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxContainer" type="VBoxContainer" parent="NetWorkErrDialog"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -288.0
margin_top = -115.0
margin_right = 288.0
margin_bottom = 115.0
custom_constants/separation = 50
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="NetWorkErrDialog/HBoxContainer"]
margin_right = 576.0
margin_bottom = 105.0
custom_fonts/font = SubResource( 16 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "网络错误"
align = 1
[node name="HBoxContainer" type="HBoxContainer" parent="NetWorkErrDialog/HBoxContainer"]
margin_top = 155.0
margin_right = 576.0
margin_bottom = 230.0
alignment = 1
[node name="ConfirmButton" type="TextureButton" parent="NetWorkErrDialog/HBoxContainer/HBoxContainer"]
margin_left = 177.0
margin_right = 398.0
margin_bottom = 75.0
texture_normal = ExtResource( 11 )
[node name="RegisterFailedPanel" type="PopupDialog" parent="."]
margin_right = 500.0
margin_bottom = 400.0
custom_styles/panel = SubResource( 17 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="RegisterFailedPanel"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -168.0
margin_top = -87.5
margin_right = 168.0
margin_bottom = 87.5
custom_constants/separation = 30
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="RegisterFailedPanel/VBoxContainer"]
margin_right = 336.0
margin_bottom = 70.0
custom_fonts/font = SubResource( 18 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "该用户名已存在"
[node name="HBoxContainer" type="HBoxContainer" parent="RegisterFailedPanel/VBoxContainer"]
margin_top = 100.0
margin_right = 336.0
margin_bottom = 175.0
alignment = 1
[node name="ConfirmButton" type="TextureButton" parent="RegisterFailedPanel/VBoxContainer/HBoxContainer"]
margin_left = 57.0
margin_right = 278.0
margin_bottom = 75.0
texture_normal = ExtResource( 11 )
[connection signal="pressed" from="HBoxContainer/LoginButton" to="." method="_on_LoginButton_pressed"]
[connection signal="pressed" from="HBoxContainer/SignupButton" to="." method="_on_SignupButton_pressed"]
[connection signal="pressed" from="RegisterDialog/VBoxContainer/HBoxContainer/RegisterConfirmButton" to="." method="_on_RegisterConfirmButton_pressed"]
[connection signal="pressed" from="LoginPanel/VBoxContainer/HBoxContainer/LoginConfirmButton" to="." method="_on_LoginConfirmButton_pressed"]