Newer
Older
DungeonShooting / DungeonShooting_Godot / prefab / ui / MapEditorTools.tscn
@小李xl 小李xl on 11 Dec 2023 5 KB 地图编辑器标记预览功能
  1. [gd_scene load_steps=12 format=3 uid="uid://b4u66mxndxbrg"]
  2.  
  3. [ext_resource type="Script" path="res://src/game/ui/mapEditorTools/MapEditorToolsPanel.cs" id="1_mqp1c"]
  4. [ext_resource type="Script" path="res://src/game/ui/mapEditorTools/DoorHoverArea.cs" id="2_6qfy3"]
  5. [ext_resource type="Texture2D" uid="uid://uhhfgdhpk7i4" path="res://icon.png" id="2_rwvbg"]
  6. [ext_resource type="Script" path="res://src/game/ui/mapEditorTools/DoorDragArea.cs" id="3_3w0w6"]
  7. [ext_resource type="Script" path="res://src/game/ui/mapEditorTools/DoorDragButton.cs" id="3_45muq"]
  8. [ext_resource type="Texture2D" uid="uid://4wupcp53rrpi" path="res://resource/sprite/ui/mapEditorTools/DoorDragButton.png" id="3_trbb5"]
  9. [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="6_krtnu"]
  10. [ext_resource type="Texture2D" uid="uid://dnty1a2tcawos" path="res://resource/sprite/ui/commonIcon/Mark.png" id="6_n7h3g"]
  11. [ext_resource type="Script" path="res://src/game/ui/mapEditorTools/MarkTool.cs" id="7_ekxcj"]
  12. [ext_resource type="Texture2D" uid="uid://cuntr7hec044f" path="res://resource/sprite/ui/commonIcon/Select.png" id="7_mqmd6"]
  13.  
  14. [sub_resource type="ShaderMaterial" id="ShaderMaterial_wxp5t"]
  15. resource_local_to_scene = true
  16. shader = ExtResource("6_krtnu")
  17. shader_parameter/blend = Color(1, 1, 1, 1)
  18. shader_parameter/schedule = 0.0
  19. shader_parameter/modulate = Color(1, 1, 1, 1)
  20. shader_parameter/show_outline = true
  21. shader_parameter/outline_color = Color(0, 0, 0, 1)
  22. shader_parameter/outline_rainbow = false
  23. shader_parameter/outline_use_blend = false
  24. shader_parameter/grey = 0.0
  25.  
  26. [node name="MapEditorTools" type="Control"]
  27. layout_mode = 3
  28. anchors_preset = 15
  29. anchor_right = 1.0
  30. anchor_bottom = 1.0
  31. grow_horizontal = 2
  32. grow_vertical = 2
  33. mouse_filter = 1
  34. script = ExtResource("1_mqp1c")
  35.  
  36. [node name="ToolRoot" type="Control" parent="."]
  37. anchors_preset = 0
  38. offset_right = 40.0
  39. offset_bottom = 40.0
  40.  
  41. [node name="N_HoverRoot" type="Control" parent="ToolRoot"]
  42. anchors_preset = 0
  43.  
  44. [node name="N_HoverArea" type="ColorRect" parent="ToolRoot/N_HoverRoot"]
  45. layout_mode = 1
  46. anchors_preset = 2
  47. anchor_top = 1.0
  48. anchor_bottom = 1.0
  49. offset_top = -36.0
  50. offset_right = 160.0
  51. grow_vertical = 0
  52. color = Color(1, 1, 1, 0)
  53. script = ExtResource("2_6qfy3")
  54.  
  55. [node name="E_HoverRoot" type="Control" parent="ToolRoot"]
  56. anchors_preset = 0
  57. rotation = 1.5708
  58.  
  59. [node name="E_HoverArea" type="ColorRect" parent="ToolRoot/E_HoverRoot"]
  60. layout_mode = 1
  61. anchors_preset = 2
  62. anchor_top = 1.0
  63. anchor_bottom = 1.0
  64. offset_top = -36.0
  65. offset_right = 160.0
  66. grow_vertical = 0
  67. color = Color(1, 1, 1, 0)
  68. script = ExtResource("2_6qfy3")
  69.  
  70. [node name="S_HoverRoot" type="Control" parent="ToolRoot"]
  71. anchors_preset = 0
  72. rotation = 3.14159
  73. scale = Vector2(-1, 1)
  74.  
  75. [node name="S_HoverArea" type="ColorRect" parent="ToolRoot/S_HoverRoot"]
  76. layout_mode = 1
  77. anchors_preset = 2
  78. anchor_top = 1.0
  79. anchor_bottom = 1.0
  80. offset_left = -9.12665e-05
  81. offset_top = -36.0
  82. offset_right = 160.0
  83. grow_vertical = 0
  84. color = Color(1, 1, 1, 0)
  85. script = ExtResource("2_6qfy3")
  86.  
  87. [node name="W_HoverRoot" type="Control" parent="ToolRoot"]
  88. anchors_preset = 0
  89. rotation = 4.71239
  90. scale = Vector2(-1, 1)
  91.  
  92. [node name="W_HoverArea" type="ColorRect" parent="ToolRoot/W_HoverRoot"]
  93. layout_mode = 1
  94. anchors_preset = 2
  95. anchor_top = 1.0
  96. anchor_bottom = 1.0
  97. offset_top = -36.0
  98. offset_right = 160.0
  99. grow_vertical = 0
  100. color = Color(1, 1, 1, 0)
  101. script = ExtResource("2_6qfy3")
  102.  
  103. [node name="HoverPreviewRoot" type="Control" parent="ToolRoot"]
  104. visible = false
  105. anchors_preset = 0
  106. mouse_filter = 2
  107.  
  108. [node name="HoverPreview" type="TextureRect" parent="ToolRoot/HoverPreviewRoot"]
  109. layout_mode = 1
  110. anchors_preset = 7
  111. anchor_left = 0.5
  112. anchor_top = 1.0
  113. anchor_right = 0.5
  114. anchor_bottom = 1.0
  115. offset_left = -2.0
  116. offset_top = -36.0
  117. offset_right = 2.0
  118. grow_horizontal = 2
  119. grow_vertical = 0
  120. mouse_filter = 2
  121. texture = ExtResource("3_trbb5")
  122.  
  123. [node name="DoorToolTemplate" type="Control" parent="ToolRoot"]
  124. anchors_preset = 0
  125. script = ExtResource("3_3w0w6")
  126.  
  127. [node name="DoorArea" type="ColorRect" parent="ToolRoot/DoorToolTemplate"]
  128. layout_mode = 1
  129. anchors_preset = 2
  130. anchor_top = 1.0
  131. anchor_bottom = 1.0
  132. offset_top = -32.0
  133. offset_right = 64.0
  134. grow_vertical = 0
  135. color = Color(0.184314, 1, 0.0392157, 0.188235)
  136.  
  137. [node name="StartBtn" type="TextureButton" parent="ToolRoot/DoorToolTemplate"]
  138. layout_mode = 1
  139. anchors_preset = 3
  140. anchor_left = 1.0
  141. anchor_top = 1.0
  142. anchor_right = 1.0
  143. anchor_bottom = 1.0
  144. offset_left = -4.0
  145. offset_top = -36.0
  146. grow_horizontal = 0
  147. grow_vertical = 0
  148. mouse_filter = 1
  149. texture_normal = ExtResource("3_trbb5")
  150. stretch_mode = 0
  151. script = ExtResource("3_45muq")
  152.  
  153. [node name="EndBtn" type="TextureButton" parent="ToolRoot/DoorToolTemplate"]
  154. layout_mode = 1
  155. anchors_preset = 2
  156. anchor_top = 1.0
  157. anchor_bottom = 1.0
  158. offset_left = 64.0
  159. offset_top = -36.0
  160. offset_right = 68.0
  161. grow_vertical = 0
  162. texture_normal = ExtResource("3_trbb5")
  163. stretch_mode = 0
  164. script = ExtResource("3_45muq")
  165.  
  166. [node name="MarkTemplate" type="TextureRect" parent="ToolRoot"]
  167. material = SubResource("ShaderMaterial_wxp5t")
  168. layout_mode = 0
  169. offset_right = 16.0
  170. offset_bottom = 16.0
  171. texture = ExtResource("6_n7h3g")
  172. expand_mode = 2
  173. stretch_mode = 5
  174. script = ExtResource("7_ekxcj")
  175.  
  176. [node name="HBoxContainer" type="HBoxContainer" parent="."]
  177. layout_mode = 1
  178. anchors_preset = 1
  179. anchor_left = 1.0
  180. anchor_right = 1.0
  181. offset_left = -84.0
  182. offset_top = 19.0
  183. offset_right = -20.0
  184. offset_bottom = 83.0
  185. grow_horizontal = 0
  186.  
  187. [node name="ToolButton" type="TextureButton" parent="HBoxContainer"]
  188. layout_mode = 2
  189. texture_normal = ExtResource("2_rwvbg")
  190.  
  191. [node name="Select" type="NinePatchRect" parent="HBoxContainer/ToolButton"]
  192. layout_mode = 1
  193. anchors_preset = 15
  194. anchor_right = 1.0
  195. anchor_bottom = 1.0
  196. grow_horizontal = 2
  197. grow_vertical = 2
  198. texture = ExtResource("7_mqmd6")
  199. region_rect = Rect2(0, 0, 36, 36)
  200. patch_margin_left = 12
  201. patch_margin_top = 12
  202. patch_margin_right = 12
  203. patch_margin_bottom = 12