feat: 增加欢迎板

- 增加欢迎板场景
- 增加与玩家的交互,点击E弹出弹出框
This commit is contained in:
2026-01-11 00:52:43 +08:00
parent 8a5a4a0005
commit 449cd1e8f3
10 changed files with 218 additions and 3 deletions

View File

@@ -0,0 +1,117 @@
[gd_scene load_steps=5 format=3 uid="uid://d8mam0n1a3b5"]
[ext_resource type="Script" uid="uid://cu6x4dxhsylw2" 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"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_card"]
bg_color = Color(1, 1, 1, 1)
corner_radius_top_left = 10
corner_radius_top_right = 10
corner_radius_bottom_right = 10
corner_radius_bottom_left = 10
shadow_color = Color(0, 0, 0, 0.2)
shadow_size = 10
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_btn_rounded"]
bg_color = Color(0.95, 0.95, 0.95, 1)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
corner_radius_top_left = 20
corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
[node name="WelcomeDialog" type="CanvasLayer"]
script = ExtResource("1_vs5b1")
[node name="ColorRect" type="ColorRect" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 0.4)
[node name="CenterContainer" type="CenterContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="PanelContainer" type="PanelContainer" parent="CenterContainer"]
custom_minimum_size = Vector2(400, 350)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_card")
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/PanelContainer"]
layout_mode = 2
theme_override_constants/separation = 10
[node name="Header" type="HBoxContainer" parent="CenterContainer/PanelContainer/VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="Spacer" type="Control" parent="CenterContainer/PanelContainer/VBoxContainer/Header"]
layout_mode = 2
size_flags_horizontal = 3
[node name="Title" type="Label" parent="CenterContainer/PanelContainer/VBoxContainer/Header"]
layout_mode = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 18
text = "欢迎来到 Datawhale Town!"
[node name="Spacer2" type="Control" parent="CenterContainer/PanelContainer/VBoxContainer/Header"]
layout_mode = 2
size_flags_horizontal = 3
[node name="CloseButton" type="Button" parent="CenterContainer/PanelContainer/VBoxContainer/Header"]
custom_minimum_size = Vector2(30, 30)
layout_mode = 2
text = "X"
flat = true
[node name="HSeparator" type="HSeparator" parent="CenterContainer/PanelContainer/VBoxContainer"]
layout_mode = 2
[node name="LogoContainer" type="CenterContainer" parent="CenterContainer/PanelContainer/VBoxContainer"]
layout_mode = 2
[node name="TextureRect" type="TextureRect" parent="CenterContainer/PanelContainer/VBoxContainer/LogoContainer"]
custom_minimum_size = Vector2(300, 100)
layout_mode = 2
texture = ExtResource("2_dy5hw")
expand_mode = 1
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
text = "连接·共生·见证
Datawhale Town —— 学习者的赛博家园与精神坐标。
✨ 实时广场:看大家都在学什么。
🏠 个人空间:展示你的学习笔记与作品。
🤝 开源营地:更有氛围的组队学习体验。"
horizontal_alignment = 1
autowrap_mode = 3
[node name="Spacer3" type="Control" parent="CenterContainer/PanelContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="ActionContainer" type="CenterContainer" parent="CenterContainer/PanelContainer/VBoxContainer"]
layout_mode = 2
[node name="StartButton" type="Button" parent="CenterContainer/PanelContainer/VBoxContainer/ActionContainer"]
custom_minimum_size = Vector2(150, 40)
layout_mode = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_styles/normal = SubResource("StyleBoxFlat_btn_rounded")
text = "开始探索"
[node name="MarginContainer" type="MarginContainer" parent="CenterContainer/PanelContainer/VBoxContainer"]
layout_mode = 2