Newer
Older
DungeonShooting / DungeonShooting_Godot / prefab / ui / TileSetEditorTerrain.tscn
@小李xl 小李xl on 11 Jan 2024 9 KB 制作2x2地形,还有bug
  1. [gd_scene load_steps=11 format=3 uid="uid://dfqb73y4br8yd"]
  2.  
  3. [ext_resource type="Script" path="res://src/game/ui/tileSetEditorTerrain/TileSetEditorTerrainPanel.cs" id="1_6jjk7"]
  4. [ext_resource type="Script" path="res://src/game/ui/tileSetEditorTerrain/down/TileEditArea.cs" id="2_ynf0r"]
  5. [ext_resource type="Script" path="res://src/game/common/ui/EditorMaskBrush.cs" id="3_gydh0"]
  6. [ext_resource type="Script" path="res://src/game/ui/tileSetEditorTerrain/up/TileEditTerrain.cs" id="5_0x7yx"]
  7. [ext_resource type="Texture2D" uid="uid://d2wslibovwv7w" path="res://resource/sprite/ui/commonIcon/CenterTool.png" id="5_08bc4"]
  8. [ext_resource type="Texture2D" uid="uid://bud6ah5xyey37" path="res://resource/sprite/map/TerrainMask2.png" id="5_xabgh"]
  9. [ext_resource type="Texture2D" uid="uid://dyshwhf3101em" path="res://resource/sprite/map/TerrainMask4.png" id="6_vbhca"]
  10. [ext_resource type="Texture2D" uid="uid://chisfq2alcq16" path="res://resource/sprite/map/TerrainMask3.png" id="6_vmj5y"]
  11. [ext_resource type="Texture2D" uid="uid://cvjj6jnmxgprw" path="res://resource/sprite/map/TerrainMask.png" id="7_g8dxk"]
  12. [ext_resource type="Script" path="res://src/game/ui/tileSetEditorTerrain/up/TerrainBrush.cs" id="7_lmu64"]
  13.  
  14. [node name="TileSetEditorTerrain" type="Control"]
  15. layout_mode = 3
  16. anchors_preset = 15
  17. anchor_right = 1.0
  18. anchor_bottom = 1.0
  19. grow_horizontal = 2
  20. grow_vertical = 2
  21. script = ExtResource("1_6jjk7")
  22.  
  23. [node name="VSplitContainer" type="VSplitContainer" parent="."]
  24. layout_mode = 1
  25. anchors_preset = 15
  26. anchor_right = 1.0
  27. anchor_bottom = 1.0
  28. grow_horizontal = 2
  29. grow_vertical = 2
  30.  
  31. [node name="PanelTop" type="Panel" parent="VSplitContainer"]
  32. layout_mode = 2
  33. size_flags_horizontal = 3
  34. size_flags_vertical = 3
  35. size_flags_stretch_ratio = 50.0
  36.  
  37. [node name="MarginContainer" type="MarginContainer" parent="VSplitContainer/PanelTop"]
  38. layout_mode = 1
  39. anchors_preset = 15
  40. anchor_right = 1.0
  41. anchor_bottom = 1.0
  42. grow_horizontal = 2
  43. grow_vertical = 2
  44. theme_override_constants/margin_left = 2
  45. theme_override_constants/margin_top = 2
  46. theme_override_constants/margin_right = 2
  47. theme_override_constants/margin_bottom = 2
  48.  
  49. [node name="TopBg" type="ColorRect" parent="VSplitContainer/PanelTop/MarginContainer"]
  50. clip_children = 2
  51. z_index = 1
  52. layout_mode = 2
  53. size_flags_horizontal = 3
  54. color = Color(0.496094, 0.496094, 0.496094, 1)
  55. script = ExtResource("5_0x7yx")
  56.  
  57. [node name="TerrainRoot" type="Control" parent="VSplitContainer/PanelTop/MarginContainer/TopBg"]
  58. layout_mode = 1
  59. anchors_preset = 8
  60. anchor_left = 0.5
  61. anchor_top = 0.5
  62. anchor_right = 0.5
  63. anchor_bottom = 0.5
  64. offset_left = -291.0
  65. offset_top = -92.0
  66. offset_right = -98.0
  67. offset_bottom = 4.0
  68. grow_horizontal = 2
  69. grow_vertical = 2
  70. scale = Vector2(3, 3)
  71. mouse_filter = 2
  72.  
  73. [node name="CellRoot" type="Control" parent="VSplitContainer/PanelTop/MarginContainer/TopBg/TerrainRoot"]
  74. layout_mode = 3
  75. anchors_preset = 0
  76. offset_right = 1.0
  77. offset_bottom = 1.0
  78. mouse_filter = 2
  79.  
  80. [node name="RightCell" type="Control" parent="VSplitContainer/PanelTop/MarginContainer/TopBg/TerrainRoot/CellRoot"]
  81. z_index = 1
  82. anchors_preset = 0
  83. offset_right = 16.0
  84. offset_bottom = 16.0
  85. mouse_filter = 1
  86.  
  87. [node name="CellTexture" type="Sprite2D" parent="VSplitContainer/PanelTop/MarginContainer/TopBg/TerrainRoot/CellRoot/RightCell"]
  88. z_index = -1
  89. centered = false
  90.  
  91. [node name="TerrainTexture1" type="TextureRect" parent="VSplitContainer/PanelTop/MarginContainer/TopBg/TerrainRoot"]
  92. self_modulate = Color(1, 1, 1, 0.27451)
  93. custom_minimum_size = Vector2(192, 64)
  94. layout_mode = 1
  95. offset_right = 192.0
  96. offset_bottom = 64.0
  97. mouse_filter = 2
  98. texture = ExtResource("7_g8dxk")
  99.  
  100. [node name="Label" type="Label" parent="VSplitContainer/PanelTop/MarginContainer/TopBg/TerrainRoot/TerrainTexture1"]
  101. layout_mode = 0
  102. offset_top = -10.0
  103. offset_right = 136.0
  104. offset_bottom = 30.0
  105. scale = Vector2(0.25, 0.25)
  106. text = "顶部墙壁"
  107.  
  108. [node name="TerrainTexture2" type="TextureRect" parent="VSplitContainer/PanelTop/MarginContainer/TopBg/TerrainRoot"]
  109. self_modulate = Color(1, 1, 1, 0.27451)
  110. custom_minimum_size = Vector2(64, 16)
  111. layout_mode = 1
  112. offset_top = 80.0
  113. offset_right = 64.0
  114. offset_bottom = 96.0
  115. mouse_filter = 2
  116. texture = ExtResource("5_xabgh")
  117.  
  118. [node name="Label" type="Label" parent="VSplitContainer/PanelTop/MarginContainer/TopBg/TerrainRoot/TerrainTexture2"]
  119. layout_mode = 0
  120. offset_top = -10.0
  121. offset_right = 136.0
  122. offset_bottom = 30.0
  123. scale = Vector2(0.25, 0.25)
  124. text = "侧方墙壁"
  125.  
  126. [node name="TerrainTexture3" type="TextureRect" parent="VSplitContainer/PanelTop/MarginContainer/TopBg/TerrainRoot"]
  127. self_modulate = Color(1, 1, 1, 0.27451)
  128. custom_minimum_size = Vector2(16, 16)
  129. layout_mode = 1
  130. offset_left = 80.0
  131. offset_top = 80.0
  132. offset_right = 96.0
  133. offset_bottom = 96.0
  134. mouse_filter = 2
  135. texture = ExtResource("6_vmj5y")
  136.  
  137. [node name="Label" type="Label" parent="VSplitContainer/PanelTop/MarginContainer/TopBg/TerrainRoot/TerrainTexture3"]
  138. layout_mode = 0
  139. offset_top = -10.0
  140. offset_right = 136.0
  141. offset_bottom = 30.0
  142. scale = Vector2(0.25, 0.25)
  143. text = "地板"
  144.  
  145. [node name="TerrainTexture4" type="TextureRect" parent="VSplitContainer/PanelTop/MarginContainer/TopBg/TerrainRoot"]
  146. visible = false
  147. self_modulate = Color(1, 1, 1, 0.27451)
  148. custom_minimum_size = Vector2(80, 48)
  149. layout_mode = 1
  150. offset_right = 80.0
  151. offset_bottom = 48.0
  152. mouse_filter = 2
  153. texture = ExtResource("6_vbhca")
  154.  
  155. [node name="Label" type="Label" parent="VSplitContainer/PanelTop/MarginContainer/TopBg/TerrainRoot/TerrainTexture4"]
  156. layout_mode = 0
  157. offset_top = -10.0
  158. offset_right = 136.0
  159. offset_bottom = 30.0
  160. scale = Vector2(0.25, 0.25)
  161. text = "地形"
  162.  
  163. [node name="Brush" type="Control" parent="VSplitContainer/PanelTop/MarginContainer/TopBg/TerrainRoot"]
  164. layout_mode = 1
  165. anchors_preset = 15
  166. anchor_right = 1.0
  167. anchor_bottom = 1.0
  168. grow_horizontal = 2
  169. grow_vertical = 2
  170. mouse_filter = 2
  171. script = ExtResource("7_lmu64")
  172.  
  173. [node name="Grid" type="ColorRect" parent="VSplitContainer/PanelTop/MarginContainer/TopBg"]
  174. layout_mode = 1
  175. anchors_preset = 15
  176. anchor_right = 1.0
  177. anchor_bottom = 1.0
  178. grow_horizontal = 2
  179. grow_vertical = 2
  180. mouse_filter = 2
  181. color = Color(1, 1, 1, 0)
  182.  
  183. [node name="FocusBtn" type="TextureButton" parent="VSplitContainer/PanelTop/MarginContainer/TopBg"]
  184. layout_mode = 1
  185. anchors_preset = 1
  186. anchor_left = 1.0
  187. anchor_right = 1.0
  188. offset_left = -79.0
  189. offset_top = 14.0
  190. offset_right = -15.0
  191. offset_bottom = 78.0
  192. grow_horizontal = 0
  193. tooltip_text = "聚焦"
  194. texture_normal = ExtResource("5_08bc4")
  195. ignore_texture_size = true
  196. stretch_mode = 5
  197.  
  198. [node name="TerrainTypeButton" type="OptionButton" parent="VSplitContainer/PanelTop/MarginContainer/TopBg"]
  199. layout_mode = 1
  200. anchors_preset = 1
  201. anchor_left = 1.0
  202. anchor_right = 1.0
  203. offset_left = -330.0
  204. offset_top = 14.0
  205. offset_right = -94.0
  206. offset_bottom = 69.0
  207. grow_horizontal = 0
  208. item_count = 2
  209. selected = 0
  210. popup/item_0/text = "47格(3*3)"
  211. popup/item_0/id = 0
  212. popup/item_1/text = "13格(2*2)"
  213. popup/item_1/id = 1
  214.  
  215. [node name="PanelBottom" type="Panel" parent="VSplitContainer"]
  216. layout_mode = 2
  217. size_flags_horizontal = 3
  218. size_flags_vertical = 3
  219. size_flags_stretch_ratio = 50.0
  220.  
  221. [node name="MarginContainer" type="MarginContainer" parent="VSplitContainer/PanelBottom"]
  222. layout_mode = 1
  223. anchors_preset = 15
  224. anchor_right = 1.0
  225. anchor_bottom = 1.0
  226. grow_horizontal = 2
  227. grow_vertical = 2
  228. theme_override_constants/margin_left = 2
  229. theme_override_constants/margin_top = 2
  230. theme_override_constants/margin_right = 2
  231. theme_override_constants/margin_bottom = 2
  232.  
  233. [node name="BottomBg" type="ColorRect" parent="VSplitContainer/PanelBottom/MarginContainer"]
  234. clip_children = 2
  235. z_index = 1
  236. layout_mode = 2
  237. color = Color(0.203922, 0.203922, 0.203922, 1)
  238. script = ExtResource("2_ynf0r")
  239.  
  240. [node name="TileTexture" type="TextureRect" parent="VSplitContainer/PanelBottom/MarginContainer/BottomBg"]
  241. layout_mode = 1
  242. anchors_preset = 8
  243. anchor_left = 0.5
  244. anchor_top = 0.5
  245. anchor_right = 0.5
  246. anchor_bottom = 0.5
  247. grow_horizontal = 2
  248. grow_vertical = 2
  249. scale = Vector2(2, 2)
  250. mouse_filter = 2
  251.  
  252. [node name="CellRoot" type="Control" parent="VSplitContainer/PanelBottom/MarginContainer/BottomBg/TileTexture"]
  253. anchors_preset = 0
  254. offset_right = 1.0
  255. offset_bottom = 1.0
  256. mouse_filter = 2
  257.  
  258. [node name="BottomCell" type="Control" parent="VSplitContainer/PanelBottom/MarginContainer/BottomBg/TileTexture/CellRoot"]
  259. anchors_preset = 0
  260. offset_right = 16.0
  261. offset_bottom = 16.0
  262. mouse_filter = 2
  263.  
  264. [node name="MaskBrush" type="Control" parent="VSplitContainer/PanelBottom/MarginContainer/BottomBg/TileTexture"]
  265. layout_mode = 1
  266. anchors_preset = 15
  267. anchor_right = 1.0
  268. anchor_bottom = 1.0
  269. grow_horizontal = 2
  270. grow_vertical = 2
  271. mouse_filter = 2
  272. script = ExtResource("3_gydh0")
  273.  
  274. [node name="Grid" type="ColorRect" parent="VSplitContainer/PanelBottom/MarginContainer/BottomBg"]
  275. layout_mode = 1
  276. anchors_preset = 15
  277. anchor_right = 1.0
  278. anchor_bottom = 1.0
  279. grow_horizontal = 2
  280. grow_vertical = 2
  281. mouse_filter = 2
  282. color = Color(1, 1, 1, 0)
  283.  
  284. [node name="FocusBtn" type="TextureButton" parent="VSplitContainer/PanelBottom/MarginContainer/BottomBg"]
  285. layout_mode = 1
  286. anchors_preset = 1
  287. anchor_left = 1.0
  288. anchor_right = 1.0
  289. offset_left = -79.0
  290. offset_top = 14.0
  291. offset_right = -15.0
  292. offset_bottom = 78.0
  293. grow_horizontal = 0
  294. tooltip_text = "聚焦"
  295. texture_normal = ExtResource("5_08bc4")
  296. ignore_texture_size = true
  297. stretch_mode = 5
  298.  
  299. [node name="DragSprite" type="Sprite2D" parent="."]
  300. z_index = 10
  301. region_enabled = true