351 lines
12 KiB
Plaintext
351 lines
12 KiB
Plaintext
[gd_scene load_steps=15 format=3 uid="uid://bv7k2nan4xj8q"]
|
|
|
|
[ext_resource type="Script" path="res://scenes/ui/ChatUI.gd" id="1"]
|
|
[ext_resource type="Script" path="res://scenes/ui/BubbleSendButton.gd" id="2"]
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_panel"]
|
|
bg_color = Color(1, 0.996, 0.984, 0.97)
|
|
border_width_left = 1
|
|
border_width_top = 1
|
|
border_width_right = 1
|
|
border_width_bottom = 1
|
|
border_color = Color(0.78, 0.86, 0.93, 0.42)
|
|
corner_radius_top_left = 26
|
|
corner_radius_top_right = 26
|
|
corner_radius_bottom_right = 26
|
|
corner_radius_bottom_left = 26
|
|
shadow_color = Color(0.12549, 0.282353, 0.407843, 0.18)
|
|
shadow_size = 18
|
|
shadow_offset = Vector2(0, 7)
|
|
|
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_tab"]
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_input"]
|
|
bg_color = Color(1, 1, 1, 0.9)
|
|
border_width_left = 1
|
|
border_width_top = 1
|
|
border_width_right = 1
|
|
border_width_bottom = 1
|
|
border_color = Color(0.76, 0.85, 0.93, 0.9)
|
|
corner_radius_top_left = 18
|
|
corner_radius_top_right = 18
|
|
corner_radius_bottom_right = 18
|
|
corner_radius_bottom_left = 18
|
|
content_margin_left = 16
|
|
content_margin_top = 6
|
|
content_margin_right = 16
|
|
content_margin_bottom = 6
|
|
|
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_input_line"]
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_friend_button"]
|
|
bg_color = Color(0.918, 0.961, 0.992, 0.96)
|
|
border_width_left = 1
|
|
border_width_top = 1
|
|
border_width_right = 1
|
|
border_width_bottom = 1
|
|
border_color = Color(0.73, 0.84, 0.93, 0.72)
|
|
corner_radius_top_left = 14
|
|
corner_radius_top_right = 14
|
|
corner_radius_bottom_right = 14
|
|
corner_radius_bottom_left = 14
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bubble_normal"]
|
|
bg_color = Color(1, 1, 1, 0.94)
|
|
border_width_left = 1
|
|
border_width_top = 1
|
|
border_width_right = 1
|
|
border_width_bottom = 1
|
|
border_color = Color(0.72, 0.84, 0.93, 0.86)
|
|
corner_radius_top_left = 16
|
|
corner_radius_top_right = 16
|
|
corner_radius_bottom_right = 16
|
|
corner_radius_bottom_left = 16
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bubble_hover"]
|
|
bg_color = Color(0.918, 0.961, 0.992, 1)
|
|
border_width_left = 1
|
|
border_width_top = 1
|
|
border_width_right = 1
|
|
border_width_bottom = 1
|
|
border_color = Color(0.392, 0.718, 0.949, 0.8)
|
|
corner_radius_top_left = 16
|
|
corner_radius_top_right = 16
|
|
corner_radius_bottom_right = 16
|
|
corner_radius_bottom_left = 16
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bubble_pressed"]
|
|
bg_color = Color(0.858, 0.925, 0.98, 1)
|
|
border_width_left = 1
|
|
border_width_top = 1
|
|
border_width_right = 1
|
|
border_width_bottom = 1
|
|
border_color = Color(0.31, 0.64, 0.89, 0.86)
|
|
corner_radius_top_left = 16
|
|
corner_radius_top_right = 16
|
|
corner_radius_bottom_right = 16
|
|
corner_radius_bottom_left = 16
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_send_normal"]
|
|
bg_color = Color(0.258824, 0.627451, 0.913725, 1)
|
|
border_width_left = 1
|
|
border_width_top = 1
|
|
border_width_right = 1
|
|
border_width_bottom = 1
|
|
border_color = Color(0.56, 0.8, 0.98, 0.72)
|
|
corner_radius_top_left = 16
|
|
corner_radius_top_right = 16
|
|
corner_radius_bottom_right = 16
|
|
corner_radius_bottom_left = 16
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_send_hover"]
|
|
bg_color = Color(0.345, 0.69, 0.945, 1)
|
|
border_width_left = 1
|
|
border_width_top = 1
|
|
border_width_right = 1
|
|
border_width_bottom = 1
|
|
border_color = Color(0.68, 0.87, 1, 0.9)
|
|
corner_radius_top_left = 16
|
|
corner_radius_top_right = 16
|
|
corner_radius_bottom_right = 16
|
|
corner_radius_bottom_left = 16
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_send_pressed"]
|
|
bg_color = Color(0.196, 0.52, 0.82, 1)
|
|
border_width_left = 1
|
|
border_width_top = 1
|
|
border_width_right = 1
|
|
border_width_bottom = 1
|
|
border_color = Color(0.46, 0.72, 0.94, 0.9)
|
|
corner_radius_top_left = 16
|
|
corner_radius_top_right = 16
|
|
corner_radius_bottom_right = 16
|
|
corner_radius_bottom_left = 16
|
|
|
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_send_focus"]
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_friend_header"]
|
|
bg_color = Color(0.925, 0.965, 1, 0.96)
|
|
border_width_left = 1
|
|
border_width_top = 1
|
|
border_width_right = 1
|
|
border_width_bottom = 1
|
|
border_color = Color(0.77, 0.87, 0.95, 0.7)
|
|
corner_radius_top_left = 16
|
|
corner_radius_top_right = 16
|
|
corner_radius_bottom_right = 16
|
|
corner_radius_bottom_left = 16
|
|
|
|
[node name="ChatUI" type="Control"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 3
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
mouse_filter = 2
|
|
script = ExtResource("1")
|
|
|
|
[node name="ChatPanel" type="PanelContainer" parent="."]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
layout_mode = 1
|
|
anchor_left = 0.024
|
|
anchor_top = 1.0
|
|
anchor_right = 0.024
|
|
anchor_bottom = 1.0
|
|
offset_top = -448.0
|
|
offset_right = 548.0
|
|
offset_bottom = -32.0
|
|
grow_vertical = 0
|
|
theme_override_styles/panel = SubResource("StyleBoxFlat_panel")
|
|
|
|
[node name="PanelMargin" type="MarginContainer" parent="ChatPanel"]
|
|
layout_mode = 2
|
|
theme_override_constants/margin_left = 20
|
|
theme_override_constants/margin_top = 18
|
|
theme_override_constants/margin_right = 20
|
|
theme_override_constants/margin_bottom = 18
|
|
|
|
[node name="ContentVBox" type="VBoxContainer" parent="ChatPanel/PanelMargin"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 10
|
|
|
|
[node name="Tabs" type="HBoxContainer" parent="ChatPanel/PanelMargin/ContentVBox"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="PopularTab" type="VBoxContainer" parent="ChatPanel/PanelMargin/ContentVBox/Tabs"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/separation = 4
|
|
|
|
[node name="PopularTabButton" type="Button" parent="ChatPanel/PanelMargin/ContentVBox/Tabs/PopularTab"]
|
|
unique_name_in_owner = true
|
|
custom_minimum_size = Vector2(0, 38)
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
mouse_default_cursor_shape = 2
|
|
theme_override_colors/font_color = Color(0.258824, 0.627451, 0.913725, 1)
|
|
theme_override_font_sizes/font_size = 15
|
|
theme_override_styles/normal = SubResource("StyleBoxEmpty_tab")
|
|
theme_override_styles/hover = SubResource("StyleBoxEmpty_tab")
|
|
theme_override_styles/pressed = SubResource("StyleBoxEmpty_tab")
|
|
theme_override_styles/focus = SubResource("StyleBoxEmpty_tab")
|
|
text = "世界频道"
|
|
|
|
[node name="Underline" type="ColorRect" parent="ChatPanel/PanelMargin/ContentVBox/Tabs/PopularTab"]
|
|
custom_minimum_size = Vector2(0, 2)
|
|
layout_mode = 2
|
|
color = Color(0.258824, 0.627451, 0.913725, 1)
|
|
|
|
[node name="RecentTab" type="VBoxContainer" parent="ChatPanel/PanelMargin/ContentVBox/Tabs"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/separation = 4
|
|
|
|
[node name="RecentTabButton" type="Button" parent="ChatPanel/PanelMargin/ContentVBox/Tabs/RecentTab"]
|
|
unique_name_in_owner = true
|
|
custom_minimum_size = Vector2(0, 38)
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
mouse_default_cursor_shape = 2
|
|
theme_override_colors/font_color = Color(0.560784, 0.639216, 0.733333, 1)
|
|
theme_override_font_sizes/font_size = 15
|
|
theme_override_styles/normal = SubResource("StyleBoxEmpty_tab")
|
|
theme_override_styles/hover = SubResource("StyleBoxEmpty_tab")
|
|
theme_override_styles/pressed = SubResource("StyleBoxEmpty_tab")
|
|
theme_override_styles/focus = SubResource("StyleBoxEmpty_tab")
|
|
text = "悄悄话"
|
|
|
|
[node name="Underline" type="ColorRect" parent="ChatPanel/PanelMargin/ContentVBox/Tabs/RecentTab"]
|
|
custom_minimum_size = Vector2(0, 2)
|
|
layout_mode = 2
|
|
color = Color(1, 1, 1, 0)
|
|
|
|
[node name="FriendsTab" type="VBoxContainer" parent="ChatPanel/PanelMargin/ContentVBox/Tabs"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/separation = 4
|
|
|
|
[node name="FriendsTabButton" type="Button" parent="ChatPanel/PanelMargin/ContentVBox/Tabs/FriendsTab"]
|
|
unique_name_in_owner = true
|
|
custom_minimum_size = Vector2(0, 38)
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
mouse_default_cursor_shape = 2
|
|
theme_override_colors/font_color = Color(0.560784, 0.639216, 0.733333, 1)
|
|
theme_override_font_sizes/font_size = 15
|
|
theme_override_styles/normal = SubResource("StyleBoxEmpty_tab")
|
|
theme_override_styles/hover = SubResource("StyleBoxEmpty_tab")
|
|
theme_override_styles/pressed = SubResource("StyleBoxEmpty_tab")
|
|
theme_override_styles/focus = SubResource("StyleBoxEmpty_tab")
|
|
text = "好友"
|
|
|
|
[node name="Underline" type="ColorRect" parent="ChatPanel/PanelMargin/ContentVBox/Tabs/FriendsTab"]
|
|
custom_minimum_size = Vector2(0, 2)
|
|
layout_mode = 2
|
|
color = Color(1, 1, 1, 0)
|
|
|
|
[node name="ChatHistory" type="ScrollContainer" parent="ChatPanel/PanelMargin/ContentVBox"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_vertical = 3
|
|
horizontal_scroll_mode = 0
|
|
|
|
[node name="MessageList" type="VBoxContainer" parent="ChatPanel/PanelMargin/ContentVBox/ChatHistory"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
size_flags_vertical = 1
|
|
theme_override_constants/separation = 10
|
|
|
|
[node name="FriendsListSurface" type="PanelContainer" parent="ChatPanel/PanelMargin/ContentVBox"]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
custom_minimum_size = Vector2(0, 50)
|
|
layout_mode = 2
|
|
theme_override_styles/panel = SubResource("StyleBoxFlat_friend_header")
|
|
|
|
[node name="FriendsList" type="HBoxContainer" parent="ChatPanel/PanelMargin/ContentVBox/FriendsListSurface"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 10
|
|
|
|
[node name="AddFriendRow" type="HBoxContainer" parent="ChatPanel/PanelMargin/ContentVBox"]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
custom_minimum_size = Vector2(0, 36)
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 8
|
|
alignment = 2
|
|
|
|
[node name="AddFriendButton" type="Button" parent="ChatPanel/PanelMargin/ContentVBox/AddFriendRow"]
|
|
unique_name_in_owner = true
|
|
custom_minimum_size = Vector2(34, 34)
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
tooltip_text = "添加好友"
|
|
theme_override_colors/font_color = Color(0.258824, 0.627451, 0.913725, 1)
|
|
theme_override_font_sizes/font_size = 17
|
|
theme_override_styles/normal = SubResource("StyleBoxFlat_friend_button")
|
|
theme_override_styles/hover = SubResource("StyleBoxFlat_friend_button")
|
|
theme_override_styles/pressed = SubResource("StyleBoxFlat_friend_button")
|
|
theme_override_styles/focus = SubResource("StyleBoxEmpty_send_focus")
|
|
text = "+"
|
|
|
|
[node name="InputRow" type="HBoxContainer" parent="ChatPanel/PanelMargin/ContentVBox"]
|
|
custom_minimum_size = Vector2(0, 50)
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 8
|
|
alignment = 1
|
|
|
|
[node name="InputShell" type="PanelContainer" parent="ChatPanel/PanelMargin/ContentVBox/InputRow"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
mouse_filter = 1
|
|
theme_override_styles/panel = SubResource("StyleBoxFlat_input")
|
|
|
|
[node name="ChatInput" type="LineEdit" parent="ChatPanel/PanelMargin/ContentVBox/InputRow/InputShell"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
focus_mode = 2
|
|
placeholder_text = "输入消息..."
|
|
localize_numeral_system = false
|
|
theme_override_colors/font_color = Color(0.188, 0.294, 0.424, 1)
|
|
theme_override_colors/font_placeholder_color = Color(0.560784, 0.639216, 0.733333, 0.88)
|
|
theme_override_font_sizes/font_size = 16
|
|
theme_override_styles/normal = SubResource("StyleBoxEmpty_input_line")
|
|
theme_override_styles/read_only = SubResource("StyleBoxEmpty_input_line")
|
|
theme_override_styles/focus = SubResource("StyleBoxEmpty_input_line")
|
|
|
|
[node name="BubbleSendButton" type="Button" parent="ChatPanel/PanelMargin/ContentVBox/InputRow"]
|
|
unique_name_in_owner = true
|
|
custom_minimum_size = Vector2(48, 48)
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
tooltip_text = "发送并弹出气泡"
|
|
theme_override_colors/font_color = Color(0.207843, 0.427451, 0.686275, 1)
|
|
theme_override_font_sizes/font_size = 18
|
|
theme_override_styles/normal = SubResource("StyleBoxFlat_bubble_normal")
|
|
theme_override_styles/hover = SubResource("StyleBoxFlat_bubble_hover")
|
|
theme_override_styles/pressed = SubResource("StyleBoxFlat_bubble_pressed")
|
|
theme_override_styles/focus = SubResource("StyleBoxEmpty_send_focus")
|
|
script = ExtResource("2")
|
|
|
|
[node name="SendButton" type="Button" parent="ChatPanel/PanelMargin/ContentVBox/InputRow"]
|
|
unique_name_in_owner = true
|
|
custom_minimum_size = Vector2(48, 48)
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
theme_override_colors/font_color = Color(1, 1, 1, 1)
|
|
theme_override_font_sizes/font_size = 22
|
|
theme_override_styles/normal = SubResource("StyleBoxFlat_send_normal")
|
|
theme_override_styles/hover = SubResource("StyleBoxFlat_send_hover")
|
|
theme_override_styles/pressed = SubResource("StyleBoxFlat_send_pressed")
|
|
theme_override_styles/focus = SubResource("StyleBoxEmpty_send_focus")
|
|
text = "➤"
|