fix: refine board collisions and world text

This commit is contained in:
2026-03-11 06:53:47 +08:00
parent 7e65137922
commit dde92737b6
7 changed files with 80 additions and 31 deletions

View File

@@ -0,0 +1,7 @@
[gd_resource type="Theme" load_steps=2 format=3]
[ext_resource type="FontFile" uid="uid://ce7ujbeobblyr" path="res://assets/fonts/msyh.ttc" id="1_font"]
[resource]
resource_local_to_scene = true
default_font = ExtResource("1_font")

View File

@@ -1112,11 +1112,12 @@ y_sort_enabled = true
position = Vector2(646, 3)
[node name="NoticeBoard" parent="." instance=ExtResource("16_rixdf")]
position = Vector2(-216, -72)
y_sort_enabled = true
position = Vector2(-216, -42.7)
[node name="WelcomeBoard" parent="." instance=ExtResource("16_edt5w")]
y_sort_enabled = true
position = Vector2(128, -80)
position = Vector2(128, -35.875)
script = ExtResource("16_u1t8b")
[node name="Boundaries" type="Node2D" parent="."]

View File

@@ -1,20 +1,35 @@
[gd_scene load_steps=4 format=3 uid="uid://rdmrm7j4iokr"]
[gd_scene load_steps=6 format=3 uid="uid://rdmrm7j4iokr"]
[ext_resource type="Script" uid="uid://pnlgf420wktn" path="res://scenes/prefabs/items/NoticeBoard.gd" id="1_script"]
[ext_resource type="Script" uid="uid://cia2i6wew103b" path="res://scenes/prefabs/items/NoticeBoard.gd" id="1_script"]
[ext_resource type="Texture2D" uid="uid://b4aildrnhbpl4" path="res://assets/materials/NoticeBoard.png" id="2_sprite"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_nb"]
size = Vector2(160, 40)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_left_post"]
size = Vector2(14, 16)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_right_post"]
size = Vector2(14, 16)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_center_bar"]
size = Vector2(125, 4.666666)
[node name="NoticeBoard" type="StaticBody2D"]
z_index = 1
scale = Vector2(0.6, 0.6)
script = ExtResource("1_script")
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(0, -16)
position = Vector2(0, -45.3)
scale = Vector2(0.5, 0.5)
texture = ExtResource("2_sprite")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 6.6666665)
shape = SubResource("RectangleShape2D_nb")
[node name="LeftPostCollision" type="CollisionShape2D" parent="."]
position = Vector2(-75, 10)
shape = SubResource("RectangleShape2D_left_post")
[node name="RightPostCollision" type="CollisionShape2D" parent="."]
position = Vector2(73.33333, 6.666667)
shape = SubResource("RectangleShape2D_right_post")
[node name="CenterBottomCollision" type="CollisionShape2D" parent="."]
position = Vector2(-2.5, -2.6666667)
shape = SubResource("RectangleShape2D_center_bar")

View File

@@ -1,17 +1,33 @@
[gd_scene load_steps=3 format=3 uid="uid://c7k8yay002w4"]
[gd_scene load_steps=5 format=3 uid="uid://c7k8yay002w4"]
[ext_resource type="Texture2D" uid="uid://v7loa3smfkrd" path="res://assets/materials/WelcomeBoard.png" id="2_sprite"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_board"]
size = Vector2(112, 18.5)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_left_post"]
size = Vector2(16, 20)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_right_post"]
size = Vector2(16, 20)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_center_bar"]
size = Vector2(76, 4)
[node name="WelcomeBoard" type="StaticBody2D"]
z_index = 1
collision_layer = 3
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(0, -44.125)
scale = Vector2(0.25, 0.25)
texture = ExtResource("2_sprite")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 14.75)
shape = SubResource("RectangleShape2D_board")
[node name="LeftPostCollision" type="CollisionShape2D" parent="."]
position = Vector2(-49, -10)
shape = SubResource("RectangleShape2D_left_post")
[node name="RightPostCollision" type="CollisionShape2D" parent="."]
position = Vector2(47, -10)
shape = SubResource("RectangleShape2D_right_post")
[node name="CenterBottomCollision" type="CollisionShape2D" parent="."]
position = Vector2(-1, -22)
shape = SubResource("RectangleShape2D_center_bar")

View File

@@ -1,6 +1,7 @@
[gd_scene load_steps=3 format=3]
[gd_scene load_steps=4 format=3]
[ext_resource type="Script" uid="uid://b4aorojcbwkmb" path="res://scenes/ui/ChatBubble.gd" id="1_script"]
[ext_resource type="Theme" path="res://assets/ui/world_text_theme.tres" id="2_theme"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bubble_modern"]
bg_color = Color(1, 1, 1, 0.9)
@@ -8,6 +9,10 @@ corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
content_margin_left = 10.0
content_margin_top = 6.0
content_margin_right = 10.0
content_margin_bottom = 6.0
shadow_color = Color(0, 0, 0, 0.2)
shadow_size = 2
@@ -15,6 +20,7 @@ shadow_size = 2
layout_mode = 3
anchors_preset = 0
script = ExtResource("1_script")
theme = ExtResource("2_theme")
[node name="PanelContainer" type="PanelContainer" parent="."]
layout_mode = 1
@@ -23,10 +29,10 @@ anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -75.0
offset_top = -60.0
offset_right = 75.0
offset_bottom = -20.0
offset_left = -120.0
offset_top = -86.0
offset_right = 120.0
offset_bottom = -26.0
grow_horizontal = 2
grow_vertical = 0
theme_override_styles/panel = SubResource("StyleBoxFlat_bubble_modern")
@@ -34,9 +40,9 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_bubble_modern")
[node name="Label" type="Label" parent="PanelContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0.1, 0.1, 0.1, 1)
theme_override_font_sizes/font_size = 8
theme_override_font_sizes/font_size = 12
text = "..."
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 3
custom_minimum_size = Vector2(150, 0)
custom_minimum_size = Vector2(220, 0)

View File

@@ -1,6 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://rdmro1jxs6ga"]
[gd_scene load_steps=4 format=3 uid="uid://rdmro1jxs6ga"]
[ext_resource type="Script" uid="uid://c227m0okmjt2t" path="res://scenes/ui/NoticeDialog.gd" id="1_script"]
[ext_resource type="Script" uid="uid://c5iq3s1myvl83" path="res://scenes/ui/NoticeDialog.gd" id="1_script"]
[ext_resource type="Theme" path="res://assets/ui/world_text_theme.tres" id="2_theme"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rounded"]
bg_color = Color(0.95, 0.95, 0.95, 1)
@@ -33,6 +34,7 @@ grow_vertical = 2
[node name="PanelContainer" type="PanelContainer" parent="CenterContainer"]
custom_minimum_size = Vector2(480, 420)
layout_mode = 2
theme = ExtResource("2_theme")
theme_override_styles/panel = SubResource("StyleBoxFlat_rounded")
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/PanelContainer"]
@@ -96,13 +98,13 @@ vertical_alignment = 1
[node name="TextPanel" type="MarginContainer" parent="CenterContainer/PanelContainer/VBoxContainer/ContentContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/margin_left = 16
theme_override_constants/margin_right = 16
theme_override_constants/margin_left = 20
theme_override_constants/margin_right = 20
[node name="ContentLabel" type="RichTextLabel" parent="CenterContainer/PanelContainer/VBoxContainer/ContentContainer/TextPanel"]
layout_mode = 2
theme_override_colors/default_color = Color(0.3, 0.3, 0.3, 1)
theme_override_font_sizes/normal_font_size = 16
theme_override_font_sizes/normal_font_size = 17
bbcode_enabled = true
text = "Announcement Content..."

View File

@@ -1,7 +1,8 @@
[gd_scene load_steps=5 format=3 uid="uid://d8mam0n1a3b5"]
[gd_scene load_steps=6 format=3 uid="uid://d8mam0n1a3b5"]
[ext_resource type="Script" uid="uid://cohijfo0yeo34" path="res://scenes/prefabs/ui/WelcomeDialog.gd" id="1_vs5b1"]
[ext_resource type="Script" uid="uid://b1x23718wrl85" path="res://scenes/ui/WelcomeDialog.gd" id="1_vs5b1"]
[ext_resource type="Texture2D" uid="uid://v7loa3smfkrd" path="res://assets/materials/WelcomeBoard.png" id="2_dy5hw"]
[ext_resource type="Theme" path="res://assets/ui/world_text_theme.tres" id="3_theme"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_card"]
bg_color = Color(1, 1, 1, 1)
@@ -44,6 +45,7 @@ grow_vertical = 2
[node name="PanelContainer" type="PanelContainer" parent="CenterContainer"]
custom_minimum_size = Vector2(400, 350)
layout_mode = 2
theme = ExtResource("3_theme")
theme_override_styles/panel = SubResource("StyleBoxFlat_card")
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/PanelContainer"]
@@ -90,7 +92,7 @@ stretch_mode = 5
[node name="BodyText" type="Label" parent="CenterContainer/PanelContainer/VBoxContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0.3, 0.3, 0.3, 1)
theme_override_font_sizes/font_size = 14
theme_override_font_sizes/font_size = 16
text = "连接·共生·见证
Datawhale Town —— 学习者的赛博家园与精神坐标。
✨ 实时广场:看大家都在学什么。