Files
whale-town-front/scenes/ui/ChatUI.tscn
王浩 6e70aac0b9 fix: 修复聊天消息显示问题
- AuthScene: 修复节点路径错误 (WhaleFrame, UsernameInput)
- ChatManager: 修复 timestamp 类型转换 (String -> float)
- ChatMessage: 修复节点引用获取方式和 UI 显示
- ChatUI: 优化消息列表布局对齐
2026-01-14 17:10:48 +08:00

121 lines
3.5 KiB
Plaintext

[gd_scene load_steps=8 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://cchjgp6qh7u61" path="res://assets/ui/chat/缩略框背景.png" id="2_7dhmv"]
[ext_resource type="Texture2D" uid="uid://clmgyxpeh5742" path="res://assets/ui/chat/输入框背景.png" id="3_fbft8"]
[ext_resource type="Texture2D" uid="uid://q0ijn5y0tbw3" path="res://assets/ui/chat/装饰2.png" id="4_xo31h"]
[ext_resource type="Texture2D" uid="uid://ct0cl4h2i6ydn" path="res://assets/ui/chat/装饰.png" id="5_xlxdo"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xo31h"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1ahvy"]
[node name="ChatUI" type="Control"]
unique_name_in_owner = true
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
script = ExtResource("1")
[node name="ChatPanel" type="Control" parent="."]
unique_name_in_owner = true
layout_mode = 1
anchor_left = 0.007
anchor_top = 0.98700005
anchor_right = 0.007
anchor_bottom = 0.98700005
offset_left = 0.36800003
offset_top = -240.01605
offset_right = 340.368
offset_bottom = -0.016052246
grow_vertical = 0
[node name="TextureRect" type="TextureRect" parent="ChatPanel"]
layout_mode = 1
anchors_preset = -1
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -240.0
offset_right = 340.0
texture = ExtResource("2_7dhmv")
expand_mode = 1
[node name="VBoxContainer" type="VBoxContainer" parent="ChatPanel"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 15.0
offset_top = 15.0
offset_right = -15.0
offset_bottom = -55.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 8
[node name="ChatHistory" type="ScrollContainer" parent="ChatPanel/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 3
horizontal_scroll_mode = 0
[node name="MessageList" type="VBoxContainer" parent="ChatPanel/VBoxContainer/ChatHistory"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
theme_override_constants/separation = 8
[node name="TextureRect2" type="TextureRect" parent="ChatPanel"]
layout_mode = 0
offset_left = 10.0
offset_top = 10.0
offset_right = 20.0
offset_bottom = 20.0
texture = ExtResource("4_xo31h")
expand_mode = 1
[node name="TextureRect3" type="TextureRect" parent="ChatPanel"]
layout_mode = 0
offset_left = 320.0
offset_top = 180.0
offset_right = 330.0
offset_bottom = 190.0
texture = ExtResource("5_xlxdo")
expand_mode = 1
[node name="TextureRect4" type="TextureRect" parent="ChatPanel"]
layout_mode = 1
anchors_preset = -1
anchor_top = 1.0
anchor_bottom = 1.0
offset_left = 15.0
offset_top = -40.0
offset_right = 325.0
offset_bottom = -10.0
texture = ExtResource("3_fbft8")
expand_mode = 1
[node name="InputContainer" type="HBoxContainer" parent="ChatPanel"]
self_modulate = Color(1, 1, 1, 0.03529412)
layout_mode = 0
offset_left = 25.0
offset_top = 202.5
offset_right = 315.0
offset_bottom = 227.5
theme_override_constants/separation = 4
[node name="ChatInput" type="LineEdit" parent="ChatPanel/InputContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
localize_numeral_system = false
theme_override_font_sizes/font_size = 12
theme_override_styles/normal = SubResource("StyleBoxEmpty_xo31h")
theme_override_styles/read_only = SubResource("StyleBoxEmpty_xo31h")
theme_override_styles/focus = SubResource("StyleBoxEmpty_1ahvy")