- 修复 WebSocketManager/SocketIOClient 函数缩进错误 - 重命名 is_connected() 避免与 Object 基类冲突 - 修复 tscn 文件多余前导空格 - 修复测试文件 GUT 断言函数调用 - 添加 GUT 测试框架
89 lines
2.5 KiB
Plaintext
89 lines
2.5 KiB
Plaintext
[gd_scene load_steps=3 format=3 uid="uid://bv7k2nan4xj8q"]
|
|
|
|
[ext_resource type="Script" uid="uid://pibdlvhb12q8" path="res://scenes/ui/ChatUI.gd" id="1"]
|
|
[ext_resource type="Texture2D" uid="uid://flepo0gpb55h" path="res://assets/ui/chat/缩略框背景.png" id="2_7dhmv"]
|
|
|
|
[node name="ChatUI" type="Control"]
|
|
custom_minimum_size = Vector2(10, 20)
|
|
layout_mode = 3
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
mouse_filter = 2
|
|
unique_name_in_owner = true
|
|
script = ExtResource("1")
|
|
|
|
[node name="TextureRect" type="TextureRect" parent="."]
|
|
layout_mode = 0
|
|
offset_left = 10.0
|
|
offset_top = 358.0
|
|
offset_right = 460.0
|
|
offset_bottom = 758.0
|
|
texture = ExtResource("2_7dhmv")
|
|
expand_mode = 1
|
|
|
|
[node name="ChatPanel" type="Panel" parent="."]
|
|
unique_name_in_owner = true
|
|
layout_mode = 1
|
|
anchors_preset = 2
|
|
anchor_top = 1.0
|
|
anchor_bottom = 1.0
|
|
offset_left = 10.0
|
|
offset_top = -410.0
|
|
offset_right = 460.0
|
|
offset_bottom = -10.0
|
|
grow_vertical = 0
|
|
|
|
[node name="VBoxContainer" type="VBoxContainer" parent="ChatPanel"]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
offset_left = 10.0
|
|
offset_top = 10.0
|
|
offset_right = -10.0
|
|
offset_bottom = -10.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="HeaderContainer" type="HBoxContainer" parent="ChatPanel/VBoxContainer"]
|
|
layout_mode = 2
|
|
|
|
[node name="StatusLabel" type="Label" parent="ChatPanel/VBoxContainer/HeaderContainer"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_colors/font_color = Color(0.5, 0.5, 0.5, 1)
|
|
theme_override_font_sizes/font_size = 12
|
|
text = "○ 未连接"
|
|
|
|
[node name="ChatHistory" type="ScrollContainer" parent="ChatPanel/VBoxContainer"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_vertical = 3
|
|
|
|
[node name="MessageList" type="VBoxContainer" parent="ChatPanel/VBoxContainer/ChatHistory"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
size_flags_vertical = 3
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="InputContainer" type="HBoxContainer" parent="ChatPanel/VBoxContainer"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="ChatInput" type="LineEdit" parent="ChatPanel/VBoxContainer/InputContainer"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
placeholder_text = "输入消息..."
|
|
|
|
[node name="SendButton" type="Button" parent="ChatPanel/VBoxContainer/InputContainer"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "发送"
|