diff --git a/DungeonShooting_Godot/prefab/Cursor.tscn b/DungeonShooting_Godot/prefab/Cursor.tscn index f68f834..a146c9b 100644 --- a/DungeonShooting_Godot/prefab/Cursor.tscn +++ b/DungeonShooting_Godot/prefab/Cursor.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=4 format=3 uid="uid://d16r232hmj3ow"] [ext_resource type="Script" path="res://src/game/Cursor.cs" id="2"] -[ext_resource type="Texture2D" uid="uid://cjiiu86a42mnj" path="res://resource/sprite/ui/CursorCenter.png" id="2_2j135"] -[ext_resource type="Texture2D" uid="uid://dta28v3fgkfru" path="res://resource/sprite/ui/cursors.png" id="3_ni3bs"] +[ext_resource type="Texture2D" uid="uid://cjiiu86a42mnj" path="res://resource/sprite/ui/sursors/CursorCenter.png" id="2_hg8gd"] +[ext_resource type="Texture2D" uid="uid://dta28v3fgkfru" path="res://resource/sprite/ui/sursors/cursors.png" id="3_8xjp7"] [node name="Cursor" type="Node2D"] z_index = 10 @@ -11,40 +11,32 @@ [node name="Center" type="Sprite2D" parent="."] visible = false scale = Vector2(4, 4) -texture = ExtResource("2_2j135") +texture = ExtResource("2_hg8gd") [node name="LT" type="Sprite2D" parent="."] scale = Vector2(4, 4) -texture = ExtResource("3_ni3bs") +texture = ExtResource("3_8xjp7") offset = Vector2(-2, -2) region_enabled = true region_rect = Rect2(67, 35, 4, 4) [node name="LB" type="Sprite2D" parent="."] scale = Vector2(4, 4) -texture = ExtResource("3_ni3bs") +texture = ExtResource("3_8xjp7") offset = Vector2(-2, 2) region_enabled = true region_rect = Rect2(67, 41, 4, 4) [node name="RT" type="Sprite2D" parent="."] scale = Vector2(4, 4) -texture = ExtResource("3_ni3bs") +texture = ExtResource("3_8xjp7") offset = Vector2(2, -2) region_enabled = true region_rect = Rect2(73, 35, 4, 4) [node name="RB" type="Sprite2D" parent="."] scale = Vector2(4, 4) -texture = ExtResource("3_ni3bs") +texture = ExtResource("3_8xjp7") offset = Vector2(2, 2) region_enabled = true region_rect = Rect2(73, 41, 4, 4) - -[node name="Finger" type="Sprite2D" parent="."] -visible = false -position = Vector2(8, 12) -scale = Vector2(4, 4) -texture = ExtResource("3_ni3bs") -region_enabled = true -region_rect = Rect2(68, 21, 7, 9) diff --git a/DungeonShooting_Godot/prefab/ui/MapEditor.tscn b/DungeonShooting_Godot/prefab/ui/MapEditor.tscn index 8c04029..9c78399 100644 --- a/DungeonShooting_Godot/prefab/ui/MapEditor.tscn +++ b/DungeonShooting_Godot/prefab/ui/MapEditor.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=8 format=3 uid="uid://csbxfkdupsckv"] +[gd_scene load_steps=9 format=3 uid="uid://csbxfkdupsckv"] [ext_resource type="Script" path="res://src/game/ui/mapEditor/MapEditorPanel.cs" id="1_5s7a0"] -[ext_resource type="TileSet" uid="uid://b00g22o1cqhe8" path="res://resource/map/tileset/TileSet1.tres" id="2_vrg60"] +[ext_resource type="Texture2D" uid="uid://cajcnlimvoxk" path="res://resource/sprite/ui/mapEditorProject/Back.png" id="2_s2w5x"] +[ext_resource type="TileSet" uid="uid://b00g22o1cqhe8" path="res://resource/map/tileSet/TileSet1.tres" id="2_vrg60"] [ext_resource type="Script" path="res://src/game/ui/mapEditor/TileView/EditorTileMap.cs" id="2_waq8f"] [ext_resource type="Texture2D" uid="uid://0878uloew5jo" path="res://resource/sprite/ui/mapEditor/ErrorCell.png" id="4_465u2"] @@ -98,12 +99,13 @@ [node name="Back" type="Button" parent="Bg/VBoxContainer/Head"] layout_mode = 2 -offset_left = 12.0 -offset_top = 8.0 -offset_right = 88.0 -offset_bottom = 62.0 +offset_left = 2.0 +offset_top = 2.0 +offset_right = 62.0 +offset_bottom = 68.0 size_flags_horizontal = 0 -text = "←" +icon = ExtResource("2_s2w5x") +icon_alignment = 1 [node name="HSplitContainer" type="HSplitContainer" parent="Bg/VBoxContainer"] layout_mode = 2 diff --git a/DungeonShooting_Godot/prefab/ui/MapEditorProject.tscn b/DungeonShooting_Godot/prefab/ui/MapEditorProject.tscn index 09e692f..ec9fd1e 100644 --- a/DungeonShooting_Godot/prefab/ui/MapEditorProject.tscn +++ b/DungeonShooting_Godot/prefab/ui/MapEditorProject.tscn @@ -1,7 +1,10 @@ -[gd_scene load_steps=3 format=3 uid="uid://dh7y03tq6v0a2"] +[gd_scene load_steps=6 format=3 uid="uid://dh7y03tq6v0a2"] [ext_resource type="Script" path="res://src/game/ui/mapEditorProject/MapEditorProjectPanel.cs" id="1_5aioo"] +[ext_resource type="Texture2D" uid="uid://blfvsup876agh" path="res://resource/sprite/ui/mapEditorProject/Search.png" id="2_gi4tc"] +[ext_resource type="Texture2D" uid="uid://cajcnlimvoxk" path="res://resource/sprite/ui/mapEditorProject/Back.png" id="2_whp38"] [ext_resource type="Texture2D" uid="uid://uhhfgdhpk7i4" path="res://icon.png" id="2_xh3iw"] +[ext_resource type="Texture2D" uid="uid://n4atvj5fkcpg" path="res://resource/sprite/ui/mapEditorProject/Add.png" id="4_qc7mu"] [node name="MapEditorProject" type="Control"] layout_mode = 3 @@ -36,12 +39,13 @@ [node name="Back" type="Button" parent="Bg/VBoxContainer/Head"] layout_mode = 2 -offset_left = 12.0 -offset_top = 8.0 -offset_right = 88.0 -offset_bottom = 62.0 +offset_left = 2.0 +offset_top = 2.0 +offset_right = 62.0 +offset_bottom = 68.0 size_flags_horizontal = 0 -text = "←" +icon = ExtResource("2_whp38") +icon_alignment = 1 [node name="HBoxContainer" type="HBoxContainer" parent="Bg/VBoxContainer"] layout_mode = 2 @@ -72,18 +76,18 @@ custom_minimum_size = Vector2(0, 45) layout_mode = 2 -[node name="GroupSearchInput" type="TextEdit" parent="Bg/VBoxContainer/HBoxContainer/Panel/MarginContainer/VBoxContainer/HBoxContainer"] +[node name="GroupSearchInput" type="LineEdit" parent="Bg/VBoxContainer/HBoxContainer/Panel/MarginContainer/VBoxContainer/HBoxContainer"] layout_mode = 2 size_flags_horizontal = 3 -text = "121212" +placeholder_text = "搜索" [node name="GroupSearchButton" type="Button" parent="Bg/VBoxContainer/HBoxContainer/Panel/MarginContainer/VBoxContainer/HBoxContainer"] layout_mode = 2 -text = "搜索" +icon = ExtResource("2_gi4tc") [node name="GroupAddButton" type="Button" parent="Bg/VBoxContainer/HBoxContainer/Panel/MarginContainer/VBoxContainer/HBoxContainer"] layout_mode = 2 -text = "+" +icon = ExtResource("4_qc7mu") [node name="ScrollContainer" type="ScrollContainer" parent="Bg/VBoxContainer/HBoxContainer/Panel/MarginContainer/VBoxContainer"] layout_mode = 2 @@ -114,14 +118,39 @@ theme_override_constants/margin_right = 12 theme_override_constants/margin_bottom = 12 -[node name="ScrollContainer" type="ScrollContainer" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer"] +[node name="VBoxContainer" type="VBoxContainer" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer"] layout_mode = 2 -[node name="RoomButton" type="Button" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer/ScrollContainer"] +[node name="HBoxContainer" type="HBoxContainer" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer/VBoxContainer"] +custom_minimum_size = Vector2(0, 45) +layout_mode = 2 + +[node name="RoomSearchInput" type="LineEdit" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer/VBoxContainer/HBoxContainer"] +custom_minimum_size = Vector2(500, 0) +layout_mode = 2 +placeholder_text = "搜索" + +[node name="RoomTypeButton" type="OptionButton" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer/VBoxContainer/HBoxContainer"] +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 + +[node name="RoomSearchButton" type="Button" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer/VBoxContainer/HBoxContainer"] +layout_mode = 2 +icon = ExtResource("2_gi4tc") + +[node name="RoomAddButton" type="Button" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer/VBoxContainer/HBoxContainer"] +layout_mode = 2 +icon = ExtResource("4_qc7mu") + +[node name="ScrollContainer" type="ScrollContainer" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="RoomButton" type="Button" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer/VBoxContainer/ScrollContainer"] custom_minimum_size = Vector2(200, 285) layout_mode = 2 -[node name="PreviewImage" type="TextureRect" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer/ScrollContainer/RoomButton"] +[node name="PreviewImage" type="TextureRect" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer/VBoxContainer/ScrollContainer/RoomButton"] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -136,7 +165,7 @@ texture = ExtResource("2_xh3iw") stretch_mode = 5 -[node name="RoomName" type="Label" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer/ScrollContainer/RoomButton"] +[node name="RoomName" type="Label" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer/VBoxContainer/ScrollContainer/RoomButton"] layout_mode = 1 anchors_preset = 12 anchor_top = 1.0 @@ -151,7 +180,7 @@ clip_text = true text_overrun_behavior = 3 -[node name="RoomType" type="Label" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer/ScrollContainer/RoomButton"] +[node name="RoomType" type="Label" parent="Bg/VBoxContainer/HBoxContainer/Panel2/MarginContainer/VBoxContainer/ScrollContainer/RoomButton"] layout_mode = 1 anchors_preset = 12 anchor_top = 1.0 diff --git a/DungeonShooting_Godot/resource/sprite/role/enemy0001/Enemy0001.png.import b/DungeonShooting_Godot/resource/sprite/role/enemy0001/Enemy0001.png.import index b20c9a6..c36be94 100644 --- a/DungeonShooting_Godot/resource/sprite/role/enemy0001/Enemy0001.png.import +++ b/DungeonShooting_Godot/resource/sprite/role/enemy0001/Enemy0001.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://chd2vtesap5cf" -path="res://.godot/imported/enemy0001.png-1247a3ddf8a1a163d812cad12c4340fd.ctex" +path="res://.godot/imported/Enemy0001.png-148a38dfa95953b26d890356e8875de4.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://resource/sprite/role/enemy0001/enemy0001.png" -dest_files=["res://.godot/imported/enemy0001.png-1247a3ddf8a1a163d812cad12c4340fd.ctex"] +source_file="res://resource/sprite/role/enemy0001/Enemy0001.png" +dest_files=["res://.godot/imported/Enemy0001.png-148a38dfa95953b26d890356e8875de4.ctex"] [params] diff --git a/DungeonShooting_Godot/resource/sprite/role/enemy0001/Enemy0001_Debris.png.import b/DungeonShooting_Godot/resource/sprite/role/enemy0001/Enemy0001_Debris.png.import index 56388a2..d563acf 100644 --- a/DungeonShooting_Godot/resource/sprite/role/enemy0001/Enemy0001_Debris.png.import +++ b/DungeonShooting_Godot/resource/sprite/role/enemy0001/Enemy0001_Debris.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://d2f55lu60x64i" -path="res://.godot/imported/enemy0001_Debris.png-297a2fb6680cb862a9a085cf58f8268c.ctex" +path="res://.godot/imported/Enemy0001_Debris.png-ac416dc79cd3c1217b27e1ef1fbe0d0b.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://resource/sprite/role/enemy0001/enemy0001_Debris.png" -dest_files=["res://.godot/imported/enemy0001_Debris.png-297a2fb6680cb862a9a085cf58f8268c.ctex"] +source_file="res://resource/sprite/role/enemy0001/Enemy0001_Debris.png" +dest_files=["res://.godot/imported/Enemy0001_Debris.png-ac416dc79cd3c1217b27e1ef1fbe0d0b.ctex"] [params] diff --git a/DungeonShooting_Godot/resource/sprite/ui/CursorCenter.png b/DungeonShooting_Godot/resource/sprite/ui/CursorCenter.png deleted file mode 100644 index 468ec82..0000000 --- a/DungeonShooting_Godot/resource/sprite/ui/CursorCenter.png +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/CursorCenter.png.import b/DungeonShooting_Godot/resource/sprite/ui/CursorCenter.png.import deleted file mode 100644 index 93da5e5..0000000 --- a/DungeonShooting_Godot/resource/sprite/ui/CursorCenter.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://cjiiu86a42mnj" -path="res://.godot/imported/CursorCenter.png-221387e3be72196967aca25a86f368aa.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resource/sprite/ui/CursorCenter.png" -dest_files=["res://.godot/imported/CursorCenter.png-221387e3be72196967aca25a86f368aa.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/cursors.png b/DungeonShooting_Godot/resource/sprite/ui/cursors.png deleted file mode 100644 index b40cfe5..0000000 --- a/DungeonShooting_Godot/resource/sprite/ui/cursors.png +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/cursors.png.import b/DungeonShooting_Godot/resource/sprite/ui/cursors.png.import deleted file mode 100644 index 2460561..0000000 --- a/DungeonShooting_Godot/resource/sprite/ui/cursors.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dta28v3fgkfru" -path="res://.godot/imported/cursors.png-39228cc5284ece278357dbc1a5b6c668.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resource/sprite/ui/cursors.png" -dest_files=["res://.godot/imported/cursors.png-39228cc5284ece278357dbc1a5b6c668.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Add.png b/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Add.png new file mode 100644 index 0000000..280a25d --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Add.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Add.png.import b/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Add.png.import new file mode 100644 index 0000000..fc9192b --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Add.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://n4atvj5fkcpg" +path="res://.godot/imported/Add.png-57ec68f80dc7c7f696876f36aff62168.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/mapEditorProject/Add.png" +dest_files=["res://.godot/imported/Add.png-57ec68f80dc7c7f696876f36aff62168.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Back.png b/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Back.png new file mode 100644 index 0000000..cd55ec2 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Back.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Back.png.import b/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Back.png.import new file mode 100644 index 0000000..f75c7ea --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Back.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cajcnlimvoxk" +path="res://.godot/imported/Back.png-3649f5132f7dd95cae3956c07c9f3b22.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/mapEditorProject/Back.png" +dest_files=["res://.godot/imported/Back.png-3649f5132f7dd95cae3956c07c9f3b22.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Search.png b/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Search.png new file mode 100644 index 0000000..cda7685 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Search.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Search.png.import b/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Search.png.import new file mode 100644 index 0000000..5c20431 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/mapEditorProject/Search.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://blfvsup876agh" +path="res://.godot/imported/Search.png-7b1bdb2c42361e1f1bcb3d4ffbc2cf9b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/mapEditorProject/Search.png" +dest_files=["res://.godot/imported/Search.png-7b1bdb2c42361e1f1bcb3d4ffbc2cf9b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/sursors/CursorCenter.png b/DungeonShooting_Godot/resource/sprite/ui/sursors/CursorCenter.png new file mode 100644 index 0000000..468ec82 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/sursors/CursorCenter.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/sursors/CursorCenter.png.import b/DungeonShooting_Godot/resource/sprite/ui/sursors/CursorCenter.png.import new file mode 100644 index 0000000..52f2c65 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/sursors/CursorCenter.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cjiiu86a42mnj" +path="res://.godot/imported/CursorCenter.png-e4db9151a43d8d98ea8e964dcd7aa856.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/sursors/CursorCenter.png" +dest_files=["res://.godot/imported/CursorCenter.png-e4db9151a43d8d98ea8e964dcd7aa856.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/sursors/Cursors.png b/DungeonShooting_Godot/resource/sprite/ui/sursors/Cursors.png new file mode 100644 index 0000000..30567ac --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/sursors/Cursors.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/sursors/Cursors.png.import b/DungeonShooting_Godot/resource/sprite/ui/sursors/Cursors.png.import new file mode 100644 index 0000000..b76c2ac --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/sursors/Cursors.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dta28v3fgkfru" +path="res://.godot/imported/Cursors.png-c127006a2ffd52e18c1a029a32603b59.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/sursors/Cursors.png" +dest_files=["res://.godot/imported/Cursors.png-c127006a2ffd52e18c1a029a32603b59.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/ui/sursors/Cursors_Ui.png b/DungeonShooting_Godot/resource/sprite/ui/sursors/Cursors_Ui.png new file mode 100644 index 0000000..91755a6 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/sursors/Cursors_Ui.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/sursors/Cursors_Ui.png.import b/DungeonShooting_Godot/resource/sprite/ui/sursors/Cursors_Ui.png.import new file mode 100644 index 0000000..e77bd4b --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/sursors/Cursors_Ui.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cal3ce13lly" +path="res://.godot/imported/Cursors_Ui.png-8a8c8b418cc772c9f1867e0a4cb1729d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/sursors/Cursors_Ui.png" +dest_files=["res://.godot/imported/Cursors_Ui.png-8a8c8b418cc772c9f1867e0a4cb1729d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/theme/mainTheme.tres b/DungeonShooting_Godot/resource/theme/mainTheme.tres index 14a294a..0e4833a 100644 --- a/DungeonShooting_Godot/resource/theme/mainTheme.tres +++ b/DungeonShooting_Godot/resource/theme/mainTheme.tres @@ -2,60 +2,44 @@ [ext_resource type="FontFile" uid="uid://cad0in7dtweo5" path="res://resource/font/VonwaonBitmap-16px.ttf" id="1_1e6k7"] -[sub_resource type="StyleBoxFlat" id="1"] -content_margin_left = 6.0 -content_margin_top = 4.0 -content_margin_right = 6.0 -content_margin_bottom = 4.0 -bg_color = Color(0.109412, 0.109412, 0.109412, 1) -border_width_left = 1 -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(0.0850983, 0.0850983, 0.0850983, 1) - [sub_resource type="StyleBoxFlat" id="2"] content_margin_left = 6.0 content_margin_top = 4.0 content_margin_right = 6.0 content_margin_bottom = 4.0 -bg_color = Color(0.0911767, 0.0911767, 0.0911767, 1) +bg_color = Color(0.0431373, 0.0431373, 0.0431373, 1) border_width_left = 1 border_width_top = 1 border_width_right = 1 border_width_bottom = 1 border_color = Color(0.117647, 0.431373, 0.905882, 1) +corner_radius_bottom_left = 4 [sub_resource type="StyleBoxFlat" id="3"] content_margin_left = 6.0 content_margin_top = 4.0 content_margin_right = 6.0 content_margin_bottom = 4.0 -bg_color = Color(0.0911767, 0.0911767, 0.0911767, 1) +bg_color = Color(0.0431373, 0.0431373, 0.0431373, 1) border_width_left = 1 border_width_top = 1 border_width_right = 1 border_width_bottom = 1 -border_color = Color(0.341177, 0.341177, 0.341177, 1) +border_color = Color(0.0666667, 0.243137, 0.509804, 1) [sub_resource type="StyleBoxFlat" id="4"] content_margin_left = 6.0 content_margin_top = 4.0 content_margin_right = 6.0 content_margin_bottom = 4.0 -bg_color = Color(0, 0, 0, 1) -border_width_left = 1 -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(0.0759806, 0.0759806, 0.0759806, 1) +bg_color = Color(0.0431373, 0.0431373, 0.0431373, 1) [sub_resource type="StyleBoxFlat" id="5"] content_margin_left = 6.0 content_margin_top = 4.0 content_margin_right = 6.0 content_margin_bottom = 4.0 -bg_color = Color(0.0911767, 0.0911767, 0.0911767, 1) +bg_color = Color(0.0431373, 0.0431373, 0.0431373, 1) border_width_left = 1 border_width_top = 1 border_width_right = 1 @@ -356,17 +340,31 @@ content_margin_right = 4.0 content_margin_bottom = 4.0 -[sub_resource type="Image" id="Image_cl4kl"] -data = { -"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 228, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 228, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 18, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 17, 255, 255, 255, 186, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 191, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 186, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 189, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 77, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 77, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), -"format": "RGBA8", -"height": 16, -"mipmaps": false, -"width": 16 -} +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_em2wh"] +content_margin_left = 5.0 +content_margin_right = 5.0 +bg_color = Color(0.0901961, 0.0901961, 0.0901961, 1) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(0.117647, 0.431373, 0.905882, 1) +shadow_size = 2 +anti_aliasing = false -[sub_resource type="ImageTexture" id="56"] -image = SubResource("Image_cl4kl") +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0jpwx"] +content_margin_left = 5.0 +content_margin_right = 5.0 +bg_color = Color(0.0901961, 0.0901961, 0.0901961, 1) +shadow_size = 2 +anti_aliasing = false + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_c3u8l"] +content_margin_left = 5.0 +content_margin_right = 5.0 +bg_color = Color(0.0901961, 0.0901961, 0.0901961, 1) +shadow_size = 2 +anti_aliasing = false [sub_resource type="StyleBoxFlat" id="57"] content_margin_left = 6.0 @@ -392,7 +390,6 @@ Button/colors/icon_color_pressed = Color(0.135294, 0.496079, 1.04176, 1) Button/constants/hseparation = 2 Button/fonts/font = ExtResource("1_1e6k7") -Button/styles/disabled = SubResource("1") Button/styles/focus = SubResource("2") Button/styles/hover = SubResource("3") Button/styles/normal = SubResource("4") @@ -484,19 +481,8 @@ Label/constants/shadow_offset_y = 1 Label/fonts/font = ExtResource("1_1e6k7") Label/styles/normal = SubResource("54") -LineEdit/colors/clear_button_color = Color(0.780392, 0.780392, 0.780392, 1) -LineEdit/colors/clear_button_color_pressed = Color(0.117647, 0.431373, 0.905882, 1) -LineEdit/colors/cursor_color = Color(0.780392, 0.780392, 0.780392, 1) -LineEdit/colors/font_color = Color(0.780392, 0.780392, 0.780392, 1) -LineEdit/colors/font_color_selected = Color(1, 1, 1, 1) -LineEdit/colors/font_color_uneditable = Color(1, 1, 1, 0.65) -LineEdit/colors/read_only = Color(1, 1, 1, 0.3) -LineEdit/colors/selection_color = Color(0.117647, 0.431373, 0.905882, 0.4) -LineEdit/constants/minimum_spaces = 12 -LineEdit/fonts/font = ExtResource("1_1e6k7") -LineEdit/icons/clear = SubResource("56") -LineEdit/styles/focus = SubResource("2") -LineEdit/styles/normal = SubResource("4") -LineEdit/styles/read_only = SubResource("1") +LineEdit/styles/focus = SubResource("StyleBoxFlat_em2wh") +LineEdit/styles/normal = SubResource("StyleBoxFlat_0jpwx") +LineEdit/styles/read_only = SubResource("StyleBoxFlat_c3u8l") Panel/styles/panel = SubResource("57") TooltipLabel/font_sizes/font_size = 32 diff --git a/DungeonShooting_Godot/src/game/Cursor.cs b/DungeonShooting_Godot/src/game/Cursor.cs index 7927549..aca4d11 100644 --- a/DungeonShooting_Godot/src/game/Cursor.cs +++ b/DungeonShooting_Godot/src/game/Cursor.cs @@ -20,16 +20,19 @@ private Sprite2D lb; private Sprite2D rt; private Sprite2D rb; - private Sprite2D finger; - + + private Texture2D _cursorUi; + public override void _Ready() { + _cursorUi = ResourceManager.LoadTexture2D(ResourcePath.resource_sprite_ui_sursors_Cursors_Ui_png); + //Input.SetCustomMouseCursor(_cursorUi, Input.CursorShape.Arrow, new Vector2(6, 6)); + center = GetNode("Center"); lt = GetNode("LT"); lb = GetNode("LB"); rt = GetNode("RT"); rb = GetNode("RB"); - finger = GetNode("Finger"); SetGuiMode(true); } @@ -46,9 +49,8 @@ { SetScope(0, null); } + SetCursorPos(); } - - SetCursorPos(); } /// @@ -63,7 +65,7 @@ lb.Visible = false; rt.Visible = false; rb.Visible = false; - finger.Visible = true; + Input.MouseMode = Input.MouseModeEnum.Visible; } else //准心 { @@ -71,7 +73,7 @@ lb.Visible = true; rt.Visible = true; rb.Visible = true; - finger.Visible = false; + Input.MouseMode = Input.MouseModeEnum.Hidden; } } diff --git a/DungeonShooting_Godot/src/game/GameApplication.cs b/DungeonShooting_Godot/src/game/GameApplication.cs index 436426c..f552551 100644 --- a/DungeonShooting_Godot/src/game/GameApplication.cs +++ b/DungeonShooting_Godot/src/game/GameApplication.cs @@ -259,7 +259,6 @@ //初始化鼠标 private void InitCursor() { - Input.MouseMode = Input.MouseModeEnum.Hidden; Cursor = ResourceManager.LoadAndInstantiate(ResourcePath.prefab_Cursor_tscn); var cursorLayer = new CanvasLayer(); cursorLayer.Name = "CursorLayer"; diff --git a/DungeonShooting_Godot/src/game/manager/ResourceManager.cs b/DungeonShooting_Godot/src/game/manager/ResourceManager.cs index be027ba..6d23584 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourceManager.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourceManager.cs @@ -127,9 +127,10 @@ /// 加载并且实例化场景, 并返回 /// /// 场景路径 - public static T LoadAndInstantiate(string path) where T : Node + /// 是否使用缓存中的资源 + public static T LoadAndInstantiate(string path, bool useCache = true) where T : Node { - var packedScene = Load(path); + var packedScene = Load(path, useCache); return packedScene.Instantiate(); } @@ -145,6 +146,16 @@ } return text; } + + /// + /// 加载2d纹理资源 + /// + /// 资源路径 + /// 是否使用缓存中的资源 + public static Texture2D LoadTexture2D(string path, bool useCache = true) + { + return Load(path, useCache); + } /// /// 将普通路径转化为 Godot 资源路径 diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index 42496d7..faf53ee 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -165,12 +165,14 @@ public const string resource_sprite_shell_Shell0001_png = "res://resource/sprite/shell/Shell0001.png"; public const string resource_sprite_shell_Shell0002_png = "res://resource/sprite/shell/Shell0002.png"; public const string resource_sprite_shell_Shell0003_png = "res://resource/sprite/shell/Shell0003.png"; - public const string resource_sprite_ui_CursorCenter_png = "res://resource/sprite/ui/CursorCenter.png"; - public const string resource_sprite_ui_cursors_png = "res://resource/sprite/ui/cursors.png"; public const string resource_sprite_ui_font_bg_png = "res://resource/sprite/ui/font_bg.png"; public const string resource_sprite_ui_GUI_png = "res://resource/sprite/ui/GUI.png"; public const string resource_sprite_ui_keyboard_e_png = "res://resource/sprite/ui/keyboard/e.png"; public const string resource_sprite_ui_mapEditor_ErrorCell_png = "res://resource/sprite/ui/mapEditor/ErrorCell.png"; + public const string resource_sprite_ui_mapEditorProject_Add_png = "res://resource/sprite/ui/mapEditorProject/Add.png"; + public const string resource_sprite_ui_mapEditorProject_Back_png = "res://resource/sprite/ui/mapEditorProject/Back.png"; + public const string resource_sprite_ui_mapEditorProject_CellBg_png = "res://resource/sprite/ui/mapEditorProject/CellBg.png"; + public const string resource_sprite_ui_mapEditorProject_Search_png = "res://resource/sprite/ui/mapEditorProject/Search.png"; public const string resource_sprite_ui_roomUI_ChargeProgress_png = "res://resource/sprite/ui/roomUI/ChargeProgress.png"; public const string resource_sprite_ui_roomUI_ChargeProgressBar_png = "res://resource/sprite/ui/roomUI/ChargeProgressBar.png"; public const string resource_sprite_ui_roomUI_Cooldown_png = "res://resource/sprite/ui/roomUI/Cooldown.png"; @@ -187,6 +189,9 @@ public const string resource_sprite_ui_roomUI_ReloadBarBlock_png = "res://resource/sprite/ui/roomUI/ReloadBarBlock.png"; public const string resource_sprite_ui_roomUI_Shield_empty_png = "res://resource/sprite/ui/roomUI/Shield_empty.png"; public const string resource_sprite_ui_roomUI_Shield_full_png = "res://resource/sprite/ui/roomUI/Shield_full.png"; + public const string resource_sprite_ui_sursors_CursorCenter_png = "res://resource/sprite/ui/sursors/CursorCenter.png"; + public const string resource_sprite_ui_sursors_Cursors_png = "res://resource/sprite/ui/sursors/Cursors.png"; + public const string resource_sprite_ui_sursors_Cursors_Ui_png = "res://resource/sprite/ui/sursors/Cursors_Ui.png"; public const string resource_sprite_weapon_bow_png = "res://resource/sprite/weapon/bow.png"; public const string resource_sprite_weapon_gun1_png = "res://resource/sprite/weapon/gun1.png"; public const string resource_sprite_weapon_gun2_png = "res://resource/sprite/weapon/gun2.png"; diff --git a/DungeonShooting_Godot/src/game/room/DungeonManager.cs b/DungeonShooting_Godot/src/game/room/DungeonManager.cs index 414ad55..af629fa 100644 --- a/DungeonShooting_Godot/src/game/room/DungeonManager.cs +++ b/DungeonShooting_Godot/src/game/room/DungeonManager.cs @@ -592,7 +592,7 @@ case DungeonRoomType.Battle: return "战斗房间"; case DungeonRoomType.Inlet: return "起始房间"; case DungeonRoomType.Outlet: return "结束房间"; - case DungeonRoomType.Boss: return "boss战房间"; + case DungeonRoomType.Boss: return "Boss房间"; case DungeonRoomType.Reward: return "奖励房间"; case DungeonRoomType.Shop: return "商店房间"; case DungeonRoomType.Event: return "事件房间"; diff --git a/DungeonShooting_Godot/src/game/ui/mapEditor/TileView/EditorTileMap.cs b/DungeonShooting_Godot/src/game/ui/mapEditor/TileView/EditorTileMap.cs index bb4f154..1a4d759 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditor/TileView/EditorTileMap.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditor/TileView/EditorTileMap.cs @@ -280,7 +280,7 @@ _isMiddlePressed = mouseButton.Pressed; if (_isMiddlePressed) { - _moveOffset = Position - mouseButton.GlobalPosition; + _moveOffset = Position - GetGlobalMousePosition(); } } } diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorProject/MapEditorProject.cs b/DungeonShooting_Godot/src/game/ui/mapEditorProject/MapEditorProject.cs index dc791d3..8b81a97 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorProject/MapEditorProject.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorProject/MapEditorProject.cs @@ -55,12 +55,12 @@ } /// - /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel.MarginContainer.VBoxContainer.HBoxContainer.GroupSearchInput + /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel.MarginContainer.VBoxContainer.HBoxContainer.GroupSearchInput /// - public class GroupSearchInput : UiNode + public class GroupSearchInput : UiNode { - public GroupSearchInput(MapEditorProject uiPanel, Godot.TextEdit node) : base(uiPanel, node) { } - public override GroupSearchInput Clone() => new (UiPanel, (Godot.TextEdit)Instance.Duplicate()); + public GroupSearchInput(MapEditorProject uiPanel, Godot.LineEdit node) : base(uiPanel, node) { } + public override GroupSearchInput Clone() => new (UiPanel, (Godot.LineEdit)Instance.Duplicate()); } /// @@ -87,13 +87,13 @@ public class HBoxContainer_1 : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel.MarginContainer.VBoxContainer.GroupSearchInput + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel.MarginContainer.VBoxContainer.GroupSearchInput /// public GroupSearchInput L_GroupSearchInput { get { - if (_L_GroupSearchInput == null) _L_GroupSearchInput = new GroupSearchInput(UiPanel, Instance.GetNodeOrNull("GroupSearchInput")); + if (_L_GroupSearchInput == null) _L_GroupSearchInput = new GroupSearchInput(UiPanel, Instance.GetNodeOrNull("GroupSearchInput")); return _L_GroupSearchInput; } } @@ -240,7 +240,104 @@ } /// - /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.ScrollContainer.RoomButton.PreviewImage + /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.HBoxContainer.RoomSearchInput + /// + public class RoomSearchInput : UiNode + { + public RoomSearchInput(MapEditorProject uiPanel, Godot.LineEdit node) : base(uiPanel, node) { } + public override RoomSearchInput Clone() => new (UiPanel, (Godot.LineEdit)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.HBoxContainer.RoomTypeButton + /// + public class RoomTypeButton : UiNode + { + public RoomTypeButton(MapEditorProject uiPanel, Godot.OptionButton node) : base(uiPanel, node) { } + public override RoomTypeButton Clone() => new (UiPanel, (Godot.OptionButton)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.HBoxContainer.RoomSearchButton + /// + public class RoomSearchButton : UiNode + { + public RoomSearchButton(MapEditorProject uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override RoomSearchButton Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.HBoxContainer.RoomAddButton + /// + public class RoomAddButton : UiNode + { + public RoomAddButton(MapEditorProject uiPanel, Godot.Button node) : base(uiPanel, node) { } + public override RoomAddButton Clone() => new (UiPanel, (Godot.Button)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.HBoxContainer + /// + public class HBoxContainer_2 : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.RoomSearchInput + /// + public RoomSearchInput L_RoomSearchInput + { + get + { + if (_L_RoomSearchInput == null) _L_RoomSearchInput = new RoomSearchInput(UiPanel, Instance.GetNodeOrNull("RoomSearchInput")); + return _L_RoomSearchInput; + } + } + private RoomSearchInput _L_RoomSearchInput; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.RoomTypeButton + /// + public RoomTypeButton L_RoomTypeButton + { + get + { + if (_L_RoomTypeButton == null) _L_RoomTypeButton = new RoomTypeButton(UiPanel, Instance.GetNodeOrNull("RoomTypeButton")); + return _L_RoomTypeButton; + } + } + private RoomTypeButton _L_RoomTypeButton; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.RoomSearchButton + /// + public RoomSearchButton L_RoomSearchButton + { + get + { + if (_L_RoomSearchButton == null) _L_RoomSearchButton = new RoomSearchButton(UiPanel, Instance.GetNodeOrNull("RoomSearchButton")); + return _L_RoomSearchButton; + } + } + private RoomSearchButton _L_RoomSearchButton; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.RoomAddButton + /// + public RoomAddButton L_RoomAddButton + { + get + { + if (_L_RoomAddButton == null) _L_RoomAddButton = new RoomAddButton(UiPanel, Instance.GetNodeOrNull("RoomAddButton")); + return _L_RoomAddButton; + } + } + private RoomAddButton _L_RoomAddButton; + + public HBoxContainer_2(MapEditorProject uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override HBoxContainer_2 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.ScrollContainer.RoomButton.PreviewImage /// public class PreviewImage : UiNode { @@ -249,7 +346,7 @@ } /// - /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.ScrollContainer.RoomButton.RoomName + /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.ScrollContainer.RoomButton.RoomName /// public class RoomName : UiNode { @@ -258,7 +355,7 @@ } /// - /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.ScrollContainer.RoomButton.RoomType + /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.ScrollContainer.RoomButton.RoomType /// public class RoomType : UiNode { @@ -267,12 +364,12 @@ } /// - /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.ScrollContainer.RoomButton + /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.ScrollContainer.RoomButton /// public class RoomButton : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.ScrollContainer.PreviewImage + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.ScrollContainer.PreviewImage /// public PreviewImage L_PreviewImage { @@ -285,7 +382,7 @@ private PreviewImage _L_PreviewImage; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.ScrollContainer.RoomName + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.ScrollContainer.RoomName /// public RoomName L_RoomName { @@ -298,7 +395,7 @@ private RoomName _L_RoomName; /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.ScrollContainer.RoomType + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.ScrollContainer.RoomType /// public RoomType L_RoomType { @@ -315,12 +412,12 @@ } /// - /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.ScrollContainer + /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.ScrollContainer /// public class ScrollContainer_1 : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.RoomButton + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.RoomButton /// public RoomButton L_RoomButton { @@ -337,12 +434,25 @@ } /// - /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer + /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer /// - public class MarginContainer_1 : UiNode + public class VBoxContainer_2 : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.ScrollContainer + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.HBoxContainer + /// + public HBoxContainer_2 L_HBoxContainer + { + get + { + if (_L_HBoxContainer == null) _L_HBoxContainer = new HBoxContainer_2(UiPanel, Instance.GetNodeOrNull("HBoxContainer")); + return _L_HBoxContainer; + } + } + private HBoxContainer_2 _L_HBoxContainer; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.ScrollContainer /// public ScrollContainer_1 L_ScrollContainer { @@ -354,6 +464,28 @@ } private ScrollContainer_1 _L_ScrollContainer; + public VBoxContainer_2(MapEditorProject uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } + public override VBoxContainer_2 Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer + /// + public class MarginContainer_1 : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.VBoxContainer + /// + public VBoxContainer_2 L_VBoxContainer + { + get + { + if (_L_VBoxContainer == null) _L_VBoxContainer = new VBoxContainer_2(UiPanel, Instance.GetNodeOrNull("VBoxContainer")); + return _L_VBoxContainer; + } + } + private VBoxContainer_2 _L_VBoxContainer; + public MarginContainer_1(MapEditorProject uiPanel, Godot.MarginContainer node) : base(uiPanel, node) { } public override MarginContainer_1 Clone() => new (UiPanel, (Godot.MarginContainer)Instance.Duplicate()); } @@ -484,7 +616,7 @@ public Head S_Head => L_Bg.L_VBoxContainer.L_Head; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel.MarginContainer.VBoxContainer.HBoxContainer.GroupSearchInput + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel.MarginContainer.VBoxContainer.HBoxContainer.GroupSearchInput /// public GroupSearchInput S_GroupSearchInput => L_Bg.L_VBoxContainer.L_HBoxContainer.L_Panel.L_MarginContainer.L_VBoxContainer.L_HBoxContainer.L_GroupSearchInput; @@ -509,24 +641,44 @@ public Panel S_Panel => L_Bg.L_VBoxContainer.L_HBoxContainer.L_Panel; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.ScrollContainer.RoomButton.PreviewImage + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.HBoxContainer.RoomSearchInput /// - public PreviewImage S_PreviewImage => L_Bg.L_VBoxContainer.L_HBoxContainer.L_Panel2.L_MarginContainer.L_ScrollContainer.L_RoomButton.L_PreviewImage; + public RoomSearchInput S_RoomSearchInput => L_Bg.L_VBoxContainer.L_HBoxContainer.L_Panel2.L_MarginContainer.L_VBoxContainer.L_HBoxContainer.L_RoomSearchInput; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.ScrollContainer.RoomButton.RoomName + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.HBoxContainer.RoomTypeButton /// - public RoomName S_RoomName => L_Bg.L_VBoxContainer.L_HBoxContainer.L_Panel2.L_MarginContainer.L_ScrollContainer.L_RoomButton.L_RoomName; + public RoomTypeButton S_RoomTypeButton => L_Bg.L_VBoxContainer.L_HBoxContainer.L_Panel2.L_MarginContainer.L_VBoxContainer.L_HBoxContainer.L_RoomTypeButton; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.ScrollContainer.RoomButton.RoomType + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.HBoxContainer.RoomSearchButton /// - public RoomType S_RoomType => L_Bg.L_VBoxContainer.L_HBoxContainer.L_Panel2.L_MarginContainer.L_ScrollContainer.L_RoomButton.L_RoomType; + public RoomSearchButton S_RoomSearchButton => L_Bg.L_VBoxContainer.L_HBoxContainer.L_Panel2.L_MarginContainer.L_VBoxContainer.L_HBoxContainer.L_RoomSearchButton; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.ScrollContainer.RoomButton + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.HBoxContainer.RoomAddButton /// - public RoomButton S_RoomButton => L_Bg.L_VBoxContainer.L_HBoxContainer.L_Panel2.L_MarginContainer.L_ScrollContainer.L_RoomButton; + public RoomAddButton S_RoomAddButton => L_Bg.L_VBoxContainer.L_HBoxContainer.L_Panel2.L_MarginContainer.L_VBoxContainer.L_HBoxContainer.L_RoomAddButton; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.ScrollContainer.RoomButton.PreviewImage + /// + public PreviewImage S_PreviewImage => L_Bg.L_VBoxContainer.L_HBoxContainer.L_Panel2.L_MarginContainer.L_VBoxContainer.L_ScrollContainer.L_RoomButton.L_PreviewImage; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.ScrollContainer.RoomButton.RoomName + /// + public RoomName S_RoomName => L_Bg.L_VBoxContainer.L_HBoxContainer.L_Panel2.L_MarginContainer.L_VBoxContainer.L_ScrollContainer.L_RoomButton.L_RoomName; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.ScrollContainer.RoomButton.RoomType + /// + public RoomType S_RoomType => L_Bg.L_VBoxContainer.L_HBoxContainer.L_Panel2.L_MarginContainer.L_VBoxContainer.L_ScrollContainer.L_RoomButton.L_RoomType; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2.MarginContainer.VBoxContainer.ScrollContainer.RoomButton + /// + public RoomButton S_RoomButton => L_Bg.L_VBoxContainer.L_HBoxContainer.L_Panel2.L_MarginContainer.L_VBoxContainer.L_ScrollContainer.L_RoomButton; /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorProject.Bg.VBoxContainer.HBoxContainer.Panel2 diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorProject/MapEditorProjectPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorProject/MapEditorProjectPanel.cs index 30823bd..d5d8d93 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorProject/MapEditorProjectPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorProject/MapEditorProjectPanel.cs @@ -1,3 +1,4 @@ +using System; using System.Linq; using Godot; @@ -19,6 +20,16 @@ public override void OnCreateUi() { + //初始化枚举选项 + var roomTypes = Enum.GetValues(); + var optionButton = S_RoomTypeButton.Instance; + optionButton.AddItem("全部", 1); + for (var i = 0; i < roomTypes.Length; i++) + { + var dungeonRoomType = roomTypes[i]; + optionButton.AddItem(DungeonManager.DungeonRoomTypeToDescribeString(dungeonRoomType), i + 1); + } + _groupGrid = new UiGrid(S_GroupButton, typeof(GroupButtonCell)); _groupGrid.SetCellOffset(new Vector2I(0, 2)); _groupGrid.SetHorizontalExpand(true);