From 72f0a6b8f7f655acab8e8f0a00f8e209f532fc23 Mon Sep 17 00:00:00 2001 From: chen Date: Thu, 30 Jul 2026 23:55:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=AF=E5=8A=A8=E6=97=B6=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E6=9C=80=E5=A4=A7=E5=8C=96=EF=BC=8CUI=20=E8=B7=9F?= =?UTF-8?q?=E9=9A=8F=E7=BC=A9=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project.godot | 4 ++-- src/UI/Panels/MainMenu/MainMenu.tscn | 8 ++++---- src/UI/Panels/StartMenu.tscn | 16 ++++++++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 src/UI/Panels/StartMenu.tscn diff --git a/project.godot b/project.godot index b1aee05..aa432f4 100644 --- a/project.godot +++ b/project.godot @@ -17,8 +17,8 @@ config/icon="res://icon.svg" [display] -window/stretch/mode="canvas_items" -window/stretch/aspect="expand" +window/size/window_mode=2 +window/stretch/mode="viewport" [dotnet] diff --git a/src/UI/Panels/MainMenu/MainMenu.tscn b/src/UI/Panels/MainMenu/MainMenu.tscn index 1824571..a54bb3e 100644 --- a/src/UI/Panels/MainMenu/MainMenu.tscn +++ b/src/UI/Panels/MainMenu/MainMenu.tscn @@ -4,23 +4,23 @@ [ext_resource type="Texture2D" uid="uid://caeqoc6wx8toy" path="res://assets/sprites/ui/BG1.png" id="1_hrti0"] [node name="MainMenu" type="Control" unique_id=1416317040] -layout_mode = 3 +layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -size_flags_horizontal = 3 -size_flags_vertical = 3 script = ExtResource("1_cwvg5") [node name="BG" type="TextureRect" parent="." unique_id=2104369666] -layout_mode = 0 +layout_mode = 1 +anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("1_hrti0") +stretch_mode = 0 [node name="Logo" type="TextureRect" parent="." unique_id=1485724026] layout_mode = 1 diff --git a/src/UI/Panels/StartMenu.tscn b/src/UI/Panels/StartMenu.tscn new file mode 100644 index 0000000..7ee1f53 --- /dev/null +++ b/src/UI/Panels/StartMenu.tscn @@ -0,0 +1,16 @@ +[gd_scene format=3 uid="uid://bkatopgh40fte"] + +[ext_resource type="PackedScene" uid="uid://dl0tb68vsw3c6" path="res://src/UI/HUD/TopBarHUD.tscn" id="1_jy7gm"] + +[node name="StartMenu" type="Control" unique_id=1272477823] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="TopBarHud" parent="." unique_id=1115394694 instance=ExtResource("1_jy7gm")] +custom_minimum_size = Vector2(100, 100) +custom_maximum_size = Vector2(100, 100) +layout_mode = 0