- 修复 WebSocketManager/SocketIOClient 函数缩进错误 - 重命名 is_connected() 避免与 Object 基类冲突 - 修复 tscn 文件多余前导空格 - 修复测试文件 GUT 断言函数调用 - 添加 GUT 测试框架
122 lines
3.9 KiB
Plaintext
122 lines
3.9 KiB
Plaintext
[gd_scene load_steps=3 format=3 uid="uid://cjabtnqbdd2ey"]
|
|
|
|
[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
|
|
script = ExtResource("1_script")
|
|
|
|
[node name="AuthScene" parent="." instance=ExtResource("2_main")]
|
|
layout_mode = 1
|
|
|
|
[node name="MainGameUI" type="Control" parent="."]
|
|
visible = false
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
|
|
[node name="TopBar" type="Panel" parent="MainGameUI"]
|
|
layout_mode = 1
|
|
anchors_preset = 10
|
|
anchor_right = 1.0
|
|
offset_bottom = 60.0
|
|
|
|
[node name="HBoxContainer" type="HBoxContainer" parent="MainGameUI/TopBar"]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
offset_left = 20.0
|
|
offset_top = 10.0
|
|
offset_right = -20.0
|
|
offset_bottom = -10.0
|
|
|
|
[node name="UserLabel" type="Label" parent="MainGameUI/TopBar/HBoxContainer"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
text = "当前用户: "
|
|
vertical_alignment = 1
|
|
|
|
[node name="LogoutButton" type="Button" parent="MainGameUI/TopBar/HBoxContainer"]
|
|
layout_mode = 2
|
|
text = "登出"
|
|
|
|
[node name="MainContent" type="Control" parent="MainGameUI"]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
offset_top = 60.0
|
|
|
|
[node name="CenterContainer" type="CenterContainer" parent="MainGameUI/MainContent"]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
|
|
[node name="VBoxContainer" type="VBoxContainer" parent="MainGameUI/MainContent/CenterContainer"]
|
|
layout_mode = 2
|
|
|
|
[node name="StatusPanel" type="Panel" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer"]
|
|
layout_mode = 2
|
|
custom_minimum_size = Vector2(400, 150)
|
|
|
|
[node name="StatusContainer" type="MarginContainer" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/StatusPanel"]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
offset_left = 20.0
|
|
offset_top = 20.0
|
|
offset_right = -20.0
|
|
offset_bottom = -20.0
|
|
|
|
[node name="StatusGrid" type="GridContainer" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/StatusPanel/StatusContainer"]
|
|
layout_mode = 2
|
|
columns = 2
|
|
|
|
[node name="LevelLabel" type="Label" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/StatusPanel/StatusContainer/StatusGrid"]
|
|
layout_mode = 2
|
|
text = "等级: 1"
|
|
|
|
[node name="CoinsLabel" type="Label" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/StatusPanel/StatusContainer/StatusGrid"]
|
|
layout_mode = 2
|
|
text = "金币: 100"
|
|
|
|
[node name="ExpLabel" type="Label" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/StatusPanel/StatusContainer/StatusGrid"]
|
|
layout_mode = 2
|
|
text = "经验: 0/100"
|
|
|
|
[node name="EnergyLabel" type="Label" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/StatusPanel/StatusContainer/StatusGrid"]
|
|
layout_mode = 2
|
|
text = "体力: 100/100"
|
|
|
|
[node name="GameMenuGrid" type="GridContainer" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer"]
|
|
layout_mode = 2
|
|
columns = 2
|
|
|
|
[node name="ExploreButton" type="Button" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/GameMenuGrid"]
|
|
layout_mode = 2
|
|
custom_minimum_size = Vector2(150, 50)
|
|
text = "🗺️ 探索小镇"
|
|
|
|
[node name="InventoryButton" type="Button" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/GameMenuGrid"]
|
|
layout_mode = 2
|
|
custom_minimum_size = Vector2(150, 50)
|
|
text = "🎒 背包"
|
|
|
|
[node name="ShopButton" type="Button" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/GameMenuGrid"]
|
|
layout_mode = 2
|
|
custom_minimum_size = Vector2(150, 50)
|
|
text = "🏪 商店"
|
|
|
|
[node name="FriendsButton" type="Button" parent="MainGameUI/MainContent/CenterContainer/VBoxContainer/GameMenuGrid"]
|
|
layout_mode = 2
|
|
custom_minimum_size = Vector2(150, 50)
|
|
text = "👥 好友" |