Merge main into qbb0530-main: 解决冲突并保留聊天和位置同步功能

This commit is contained in:
2026-02-07 16:27:53 +08:00
37 changed files with 68 additions and 582 deletions

View File

@@ -14,7 +14,6 @@ extends Control
# 场景节点引用
@onready var auth_scene: Control = $AuthScene
@onready var main_game_ui: Control = $MainGameUI
@onready var chat_ui: Control = %ChatUI
@onready var user_label: Label = $MainGameUI/TopBar/HBoxContainer/UserLabel
@onready var logout_button: Button = $MainGameUI/TopBar/HBoxContainer/LogoutButton
@@ -156,4 +155,4 @@ func _input(event):
get_tree().quit()
GameState.MAIN_GAME:
# 在游戏中按ESC可能显示菜单或返回登录
show_auth_scene()
show_auth_scene()

View File

@@ -1,16 +1,13 @@
[gd_scene load_steps=4 format=3 uid="uid://cjabtnqbdd2ey"]
[gd_scene load_steps=3 format=3 uid="uid://cjabtnqbdd2ey"]
[ext_resource type="Script" uid="uid://ghehm4srs0ho" path="res://scenes/MainScene.gd" id="1_script"]
[ext_resource type="Script" path="res://scenes/MainScene.gd" id="1_script"]
[ext_resource type="PackedScene" uid="uid://by7m8snb4xllf" path="res://scenes/ui/AuthScene.tscn" id="2_main"]
[ext_resource type="PackedScene" uid="uid://bv7k2nan4xj8q" path="res://scenes/ui/ChatUI.tscn" id="3_chat_ui"]
[node name="Main" 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_script")
[node name="AuthScene" parent="." instance=ExtResource("2_main")]
@@ -22,15 +19,12 @@ layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="TopBar" type="Panel" parent="MainGameUI"]
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
offset_bottom = 60.0
grow_horizontal = 2
[node name="HBoxContainer" type="HBoxContainer" parent="MainGameUI/TopBar"]
layout_mode = 1
@@ -41,8 +35,6 @@ offset_left = 20.0
offset_top = 10.0
offset_right = -20.0
offset_bottom = -10.0
grow_horizontal = 2
grow_vertical = 2
[node name="UserLabel" type="Label" parent="MainGameUI/TopBar/HBoxContainer"]
layout_mode = 2
@@ -60,23 +52,19 @@ anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = 60.0
grow_horizontal = 2
grow_vertical = 2
[node name="CenterContainer" type="CenterContainer" parent="MainGameUI/MainContent"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="VBoxContainer" type="VBoxContainer" parent="MainGameUI/MainContent/CenterContainer"]
layout_mode = 2
[node name="StatusPanel" type="Panel" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer"]
custom_minimum_size = Vector2(400, 150)
layout_mode = 2
custom_minimum_size = Vector2(400, 150)
[node name="StatusContainer" type="MarginContainer" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/StatusPanel"]
layout_mode = 1
@@ -87,8 +75,6 @@ offset_left = 20.0
offset_top = 20.0
offset_right = -20.0
offset_bottom = -20.0
grow_horizontal = 2
grow_vertical = 2
[node name="StatusGrid" type="GridContainer" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/StatusPanel/StatusContainer"]
layout_mode = 2
@@ -115,24 +101,21 @@ layout_mode = 2
columns = 2
[node name="ExploreButton" type="Button" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/GameMenuGrid"]
custom_minimum_size = Vector2(150, 50)
layout_mode = 2
custom_minimum_size = Vector2(150, 50)
text = "🗺️ 探索小镇"
[node name="InventoryButton" type="Button" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/GameMenuGrid"]
custom_minimum_size = Vector2(150, 50)
layout_mode = 2
custom_minimum_size = Vector2(150, 50)
text = "🎒 背包"
[node name="ShopButton" type="Button" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/GameMenuGrid"]
custom_minimum_size = Vector2(150, 50)
layout_mode = 2
custom_minimum_size = Vector2(150, 50)
text = "🏪 商店"
[node name="FriendsButton" type="Button" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/GameMenuGrid"]
custom_minimum_size = Vector2(150, 50)
layout_mode = 2
text = "👥 好友"
[node name="ChatUI" parent="MainGameUI" instance=ExtResource("3_chat_ui")]
layout_mode = 1
custom_minimum_size = Vector2(150, 50)
text = "👥 好友"

View File

@@ -1 +0,0 @@
uid://b7bgtip4yxeg8

View File

@@ -1 +0,0 @@
uid://djqrgj3h0lif7

View File

@@ -1,14 +1,10 @@
[gd_scene load_steps=13 format=3 uid="uid://by7m8snb4xllf"]
[gd_scene load_steps=10 format=3 uid="uid://by7m8snb4xllf"]
[ext_resource type="Texture2D" uid="uid://bx17oy8lvaca4" path="res://assets/ui/auth/bg_auth_scene.png" id="1_background"]
[ext_resource type="Script" uid="uid://b514h2wuido0h" path="res://scenes/ui/AuthScene.gd" id="3_script"]
[ext_resource type="Texture2D" uid="uid://dyma4hpodhdxi" path="res://assets/ui/auth/登录背景.png" id="3_wh4n4"]
[ext_resource type="Texture2D" uid="uid://cnrffaqbtw8f5" path="res://assets/ui/auth/输入框.png" id="4_lnw07"]
[ext_resource type="Texture2D" uid="uid://de4q4s1gxivtf" path="res://assets/ui/auth/login_frame_smart_transparent.png" id="2_frame"]
[ext_resource type="Script" path="res://scenes/ui/AuthScene.gd" id="3_script"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_26vyf"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_cjyup"]
texture = ExtResource("4_lnw07")
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hover"]
bg_color = Color(0.3, 0.6, 0.9, 1)
@@ -63,8 +59,6 @@ Button/styles/hover = SubResource("StyleBoxFlat_hover")
Button/styles/normal = SubResource("StyleBoxFlat_normal")
Button/styles/pressed = SubResource("StyleBoxFlat_pressed")
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1"]
[node name="AuthScene" type="Control"]
layout_mode = 3
anchors_preset = 15
@@ -87,14 +81,22 @@ texture = ExtResource("1_background")
expand_mode = 1
stretch_mode = 6
[node name="ColorRect" type="ColorRect" parent="."]
modulate = Color(0.84313726, 0.92941177, 0.98039216, 0.47058824)
[node name="WhaleFrame" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -300.0
offset_top = -300.0
offset_right = 300.0
offset_bottom = 300.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_frame")
expand_mode = 1
stretch_mode = 5
[node name="CenterContainer" type="CenterContainer" parent="."]
layout_mode = 1
@@ -110,45 +112,35 @@ offset_bottom = 236.0
grow_horizontal = 2
grow_vertical = 2
[node name="WhaleFrame" type="TextureRect" parent="CenterContainer"]
custom_minimum_size = Vector2(500, 0)
layout_mode = 2
texture = ExtResource("3_wh4n4")
expand_mode = 4
stretch_mode = 5
[node name="LoginPanel" type="Panel" parent="CenterContainer"]
custom_minimum_size = Vector2(300, 0)
custom_minimum_size = Vector2(350, 400)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxEmpty_26vyf")
theme_override_styles/panel = SubResource("StyleBoxEmpty_1")
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/LoginPanel"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -140.0
offset_top = -185.5
offset_right = 140.0
offset_bottom = 185.5
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 30.0
offset_top = 30.0
offset_right = -30.0
offset_bottom = -30.0
grow_horizontal = 2
grow_vertical = 2
[node name="TitleLabel" type="Label" parent="CenterContainer/LoginPanel/VBoxContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_colors/font_shadow_color = Color(0.011764706, 0.12156863, 0.101960786, 0)
theme_override_font_sizes/font_size = 32
theme_override_font_sizes/font_size = 24
text = "Whaletown"
horizontal_alignment = 1
vertical_alignment = 1
[node name="SubtitleLabel" type="Label" parent="CenterContainer/LoginPanel/VBoxContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0.53333336, 0.53333336, 0.53333336, 1)
theme_override_font_sizes/font_size = 16
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 14
text = "开始你的小镇之旅!"
horizontal_alignment = 1
vertical_alignment = 1
@@ -188,13 +180,10 @@ theme_override_font_sizes/font_size = 12
text = "用户名不能为空"
horizontal_alignment = 2
[node name="UsernameInput" type="LineEdit" parent="CenterContainer/LoginPanel/VBoxContainer/LoginForm"]
custom_minimum_size = Vector2(0, 48)
[node name="UsernameInput" type="LineEdit" parent="CenterContainer/LoginPanel/VBoxContainer/LoginForm/UsernameContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_colors/font_placeholder_color = Color(0.5, 0.5, 0.5, 1)
theme_override_colors/selection_color = Color(0.5, 0.5, 0.5, 1)
theme_override_styles/normal = SubResource("StyleBoxTexture_cjyup")
placeholder_text = "用户名/手机/邮箱"
[node name="PasswordContainer" type="VBoxContainer" parent="CenterContainer/LoginPanel/VBoxContainer/LoginForm"]
@@ -563,8 +552,6 @@ theme = SubResource("Theme_button")
text = "返回登录"
[node name="ToastContainer" type="Control" parent="."]
modulate = Color(0.84313726, 0.92941177, 0.98039216, 1)
self_modulate = Color(0.84313726, 0.92941177, 0.9843137, 1)
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0

View File

@@ -1 +0,0 @@
uid://pibdlvhb12q8