Canvas2D.tscn 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. [gd_scene load_steps=30 format=3 uid="uid://dktf5unru0wec"]
  2. [ext_resource type="Script" uid="uid://cqpvmeps4d2ds" path="res://Scripts/panel/canvas_2d.gd" id="1_yat5f"]
  3. [ext_resource type="Shader" uid="uid://cc1o2iqoutd7i" path="res://Resources/Shader/CanvasBackground.gdshader" id="2_4wovy"]
  4. [ext_resource type="Shader" uid="uid://cqg7diaaf5j6" path="res://Resources/Shader/FreeTransform.gdshader" id="3_7udx1"]
  5. [ext_resource type="Script" uid="uid://c3pwgiwghxmor" path="res://Scripts/panel/free_transform.gd" id="4_qi8hi"]
  6. [ext_resource type="Shader" uid="uid://cnsq1ra38csil" path="res://Resources/Shader/CanvasRuler.gdshader" id="5_5v8li"]
  7. [ext_resource type="Theme" uid="uid://dmgdeh6kw3b7u" path="res://Resources/Theme/basic_theme.tres" id="6_gf8i1"]
  8. [ext_resource type="Theme" uid="uid://cwtfo6s86vv46" path="res://Resources/Theme/check_button_theme.tres" id="7_ngnpx"]
  9. [ext_resource type="Texture2D" uid="uid://daprdynsx6da8" path="res://Resources/UI/bg_transparent.png" id="8_24fh3"]
  10. [sub_resource type="ShaderMaterial" id="ShaderMaterial_h83a8"]
  11. shader = ExtResource("2_4wovy")
  12. shader_parameter/bg_color = Color(0.0980392, 0.0980392, 0.0980392, 1)
  13. shader_parameter/zoom = 0.0
  14. [sub_resource type="ShaderMaterial" id="ShaderMaterial_mdsp2"]
  15. shader = ExtResource("3_7udx1")
  16. shader_parameter/points = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0)
  17. shader_parameter/square_color = Color(1, 1, 1, 1)
  18. shader_parameter/square_line_color = Color(0, 0.721569, 1, 1)
  19. shader_parameter/editable = false
  20. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1ap8l"]
  21. bg_color = Color(0.196078, 0.196078, 0.196078, 1)
  22. [sub_resource type="ShaderMaterial" id="ShaderMaterial_g1s0g"]
  23. shader = ExtResource("5_5v8li")
  24. shader_parameter/is_horizontal = true
  25. shader_parameter/ruler_size = Vector2(0, 0)
  26. shader_parameter/ruler_range = Vector4(0, 0, 0, 0)
  27. shader_parameter/highlight_range = Vector4(0, 0, 0, 0)
  28. shader_parameter/mouse_pos = Vector2(0, 0)
  29. shader_parameter/mouse_line_color = Color(0.953041, 0.95304, 0.953041, 1)
  30. shader_parameter/line_color = Color(0.563626, 0.563626, 0.563626, 1)
  31. shader_parameter/highlight_color = Color(0.278431, 0.278431, 0.278431, 1)
  32. shader_parameter/bg_color = Color(0.129412, 0.129412, 0.129412, 1)
  33. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mjnoy"]
  34. [sub_resource type="ShaderMaterial" id="ShaderMaterial_wxg4f"]
  35. shader = ExtResource("5_5v8li")
  36. shader_parameter/is_horizontal = false
  37. shader_parameter/ruler_size = Vector2(0, 0)
  38. shader_parameter/ruler_range = Vector4(0, 0, 0, 0)
  39. shader_parameter/highlight_range = Vector4(0, 0, 0, 0)
  40. shader_parameter/mouse_pos = Vector2(0, 0)
  41. shader_parameter/mouse_line_color = Color(0.952941, 0.952941, 0.952941, 1)
  42. shader_parameter/line_color = Color(0.564706, 0.564706, 0.564706, 1)
  43. shader_parameter/highlight_color = Color(0.278431, 0.278431, 0.278431, 1)
  44. shader_parameter/bg_color = Color(0.129412, 0.129412, 0.129412, 1)
  45. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_oijon"]
  46. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_sy45p"]
  47. bg_color = Color(0.196078, 0.196078, 0.196078, 1)
  48. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6wh7v"]
  49. bg_color = Color(0.160784, 0.160784, 0.160784, 1)
  50. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wxg4f"]
  51. bg_color = Color(0.160784, 0.160784, 0.160784, 1)
  52. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_y3iko"]
  53. bg_color = Color(0.196078, 0.196078, 0.196078, 1)
  54. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_g1s0g"]
  55. bg_color = Color(0.196078, 0.196078, 0.196078, 1)
  56. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mdsp2"]
  57. bg_color = Color(0.160784, 0.160784, 0.160784, 1)
  58. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_h83a8"]
  59. bg_color = Color(0.278431, 0.278431, 0.278431, 1)
  60. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_oy7qd"]
  61. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_r4gi2"]
  62. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_js1y7"]
  63. bg_color = Color(0.160784, 0.160784, 0.160784, 1)
  64. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qullj"]
  65. bg_color = Color(0.278431, 0.278431, 0.278431, 1)
  66. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_k5cmw"]
  67. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5pxgr"]
  68. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0t8rv"]
  69. bg_color = Color(0.196078, 0.196078, 0.196078, 1)
  70. [node name="Canvas2d" type="Node2D"]
  71. script = ExtResource("1_yat5f")
  72. [node name="Root" type="Sprite2D" parent="."]
  73. material = SubResource("ShaderMaterial_h83a8")
  74. [node name="Xaxis" type="Line2D" parent="."]
  75. points = PackedVector2Array(-999999, 0, 99999, 0)
  76. width = 1.0
  77. default_color = Color(0.796078, 0.227451, 0.313726, 1)
  78. [node name="Yaxis" type="Line2D" parent="."]
  79. points = PackedVector2Array(0, -99999, 0, 99999)
  80. width = 1.0
  81. default_color = Color(0.470588, 0.705882, 0.0823529, 1)
  82. [node name="FreeTransform" type="Sprite2D" parent="."]
  83. material = SubResource("ShaderMaterial_mdsp2")
  84. script = ExtResource("4_qi8hi")
  85. [node name="Camera2D" type="Camera2D" parent="."]
  86. [node name="CanvasLayer" type="CanvasLayer" parent="."]
  87. [node name="CanvasRoot" type="Control" parent="CanvasLayer"]
  88. layout_mode = 3
  89. anchors_preset = 15
  90. anchor_right = 1.0
  91. anchor_bottom = 1.0
  92. grow_horizontal = 2
  93. grow_vertical = 2
  94. size_flags_horizontal = 3
  95. size_flags_vertical = 3
  96. [node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/CanvasRoot"]
  97. layout_mode = 1
  98. anchors_preset = 15
  99. anchor_right = 1.0
  100. anchor_bottom = 1.0
  101. grow_horizontal = 2
  102. grow_vertical = 2
  103. theme_override_constants/separation = 0
  104. [node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/CanvasRoot/HBoxContainer"]
  105. layout_mode = 2
  106. size_flags_horizontal = 3
  107. theme_override_constants/separation = 0
  108. [node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer"]
  109. layout_mode = 2
  110. size_flags_vertical = 0
  111. theme_override_constants/separation = 0
  112. [node name="Corner1" type="Panel" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer"]
  113. custom_minimum_size = Vector2(31, 31)
  114. layout_mode = 2
  115. theme_override_styles/panel = SubResource("StyleBoxFlat_1ap8l")
  116. [node name="HRuler" type="Panel" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer"]
  117. material = SubResource("ShaderMaterial_g1s0g")
  118. layout_mode = 2
  119. size_flags_horizontal = 3
  120. theme_override_styles/panel = SubResource("StyleBoxFlat_mjnoy")
  121. [node name="HBoxContainer2" type="HBoxContainer" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer"]
  122. layout_mode = 2
  123. size_flags_vertical = 3
  124. theme_override_constants/separation = 0
  125. [node name="VRuler" type="Panel" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2"]
  126. material = SubResource("ShaderMaterial_wxg4f")
  127. custom_minimum_size = Vector2(31, 0)
  128. layout_mode = 2
  129. theme_override_styles/panel = SubResource("StyleBoxFlat_oijon")
  130. [node name="CanvasContainer" type="Control" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2"]
  131. layout_mode = 2
  132. size_flags_horizontal = 3
  133. [node name="ToolBarPanel" type="Panel" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2/CanvasContainer"]
  134. layout_mode = 1
  135. anchors_preset = 1
  136. anchor_left = 1.0
  137. anchor_right = 1.0
  138. offset_left = -280.0
  139. offset_bottom = 300.0
  140. grow_horizontal = 0
  141. theme = ExtResource("6_gf8i1")
  142. [node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2/CanvasContainer/ToolBarPanel"]
  143. layout_mode = 1
  144. anchors_preset = 15
  145. anchor_right = 1.0
  146. anchor_bottom = 1.0
  147. grow_horizontal = 2
  148. grow_vertical = 2
  149. theme_override_constants/separation = 0
  150. [node name="Panel" type="Panel" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2/CanvasContainer/ToolBarPanel/VBoxContainer"]
  151. custom_minimum_size = Vector2(0, 48)
  152. layout_mode = 2
  153. theme_override_styles/panel = SubResource("StyleBoxFlat_sy45p")
  154. [node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2/CanvasContainer/ToolBarPanel/VBoxContainer/Panel"]
  155. layout_mode = 1
  156. anchors_preset = 8
  157. anchor_left = 0.5
  158. anchor_top = 0.5
  159. anchor_right = 0.5
  160. anchor_bottom = 0.5
  161. offset_left = -128.0
  162. offset_top = -24.0
  163. offset_right = 128.0
  164. offset_bottom = 24.0
  165. grow_horizontal = 2
  166. grow_vertical = 2
  167. size_flags_horizontal = 4
  168. [node name="Button0" type="Button" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2/CanvasContainer/ToolBarPanel/VBoxContainer/Panel/HBoxContainer"]
  169. custom_minimum_size = Vector2(48, 48)
  170. layout_mode = 2
  171. theme = ExtResource("7_ngnpx")
  172. toggle_mode = true
  173. icon = ExtResource("8_24fh3")
  174. icon_alignment = 1
  175. [node name="Button1" type="Button" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2/CanvasContainer/ToolBarPanel/VBoxContainer/Panel/HBoxContainer"]
  176. custom_minimum_size = Vector2(48, 48)
  177. layout_mode = 2
  178. theme = ExtResource("7_ngnpx")
  179. toggle_mode = true
  180. [node name="ColorRect" type="ColorRect" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2/CanvasContainer/ToolBarPanel/VBoxContainer/Panel/HBoxContainer/Button1"]
  181. custom_minimum_size = Vector2(28, 28)
  182. layout_mode = 1
  183. anchors_preset = 8
  184. anchor_left = 0.5
  185. anchor_top = 0.5
  186. anchor_right = 0.5
  187. anchor_bottom = 0.5
  188. offset_left = -14.0
  189. offset_top = -14.0
  190. offset_right = 14.0
  191. offset_bottom = 14.0
  192. grow_horizontal = 2
  193. grow_vertical = 2
  194. mouse_filter = 1
  195. [node name="Button2" type="Button" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2/CanvasContainer/ToolBarPanel/VBoxContainer/Panel/HBoxContainer"]
  196. custom_minimum_size = Vector2(48, 48)
  197. layout_mode = 2
  198. theme = ExtResource("7_ngnpx")
  199. toggle_mode = true
  200. [node name="ColorRect" type="ColorRect" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2/CanvasContainer/ToolBarPanel/VBoxContainer/Panel/HBoxContainer/Button2"]
  201. custom_minimum_size = Vector2(28, 28)
  202. layout_mode = 1
  203. anchors_preset = 8
  204. anchor_left = 0.5
  205. anchor_top = 0.5
  206. anchor_right = 0.5
  207. anchor_bottom = 0.5
  208. offset_left = -14.0
  209. offset_top = -14.0
  210. offset_right = 14.0
  211. offset_bottom = 14.0
  212. grow_horizontal = 2
  213. grow_vertical = 2
  214. mouse_filter = 2
  215. color = Color(0.501961, 0.501961, 0.501961, 1)
  216. [node name="Button3" type="Button" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2/CanvasContainer/ToolBarPanel/VBoxContainer/Panel/HBoxContainer"]
  217. custom_minimum_size = Vector2(48, 48)
  218. layout_mode = 2
  219. theme = ExtResource("7_ngnpx")
  220. toggle_mode = true
  221. [node name="ColorRect" type="ColorRect" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2/CanvasContainer/ToolBarPanel/VBoxContainer/Panel/HBoxContainer/Button3"]
  222. custom_minimum_size = Vector2(28, 28)
  223. layout_mode = 1
  224. anchors_preset = 8
  225. anchor_left = 0.5
  226. anchor_top = 0.5
  227. anchor_right = 0.5
  228. anchor_bottom = 0.5
  229. offset_left = -14.0
  230. offset_top = -14.0
  231. offset_right = 14.0
  232. offset_bottom = 14.0
  233. grow_horizontal = 2
  234. grow_vertical = 2
  235. mouse_filter = 2
  236. color = Color(0.25098, 0.25098, 0.25098, 1)
  237. [node name="Button4" type="Button" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2/CanvasContainer/ToolBarPanel/VBoxContainer/Panel/HBoxContainer"]
  238. custom_minimum_size = Vector2(48, 48)
  239. layout_mode = 2
  240. theme = ExtResource("7_ngnpx")
  241. toggle_mode = true
  242. [node name="ColorRect" type="ColorRect" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2/CanvasContainer/ToolBarPanel/VBoxContainer/Panel/HBoxContainer/Button4"]
  243. custom_minimum_size = Vector2(28, 28)
  244. layout_mode = 1
  245. anchors_preset = 8
  246. anchor_left = 0.5
  247. anchor_top = 0.5
  248. anchor_right = 0.5
  249. anchor_bottom = 0.5
  250. offset_left = -14.0
  251. offset_top = -14.0
  252. offset_right = 14.0
  253. offset_bottom = 14.0
  254. grow_horizontal = 2
  255. grow_vertical = 2
  256. mouse_filter = 2
  257. color = Color(0, 0, 0, 1)
  258. [node name="AssetListview" type="Tree" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer2/CanvasContainer/ToolBarPanel/VBoxContainer"]
  259. layout_mode = 2
  260. size_flags_vertical = 3
  261. column_titles_visible = true
  262. allow_reselect = true
  263. select_mode = 1
  264. scroll_horizontal_enabled = false
  265. [node name="HBoxContainer3" type="HBoxContainer" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer"]
  266. layout_mode = 2
  267. theme_override_constants/separation = 0
  268. [node name="PanelContainer" type="PanelContainer" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer3"]
  269. layout_mode = 2
  270. [node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer3/PanelContainer"]
  271. layout_mode = 2
  272. theme_override_constants/separation = 0
  273. [node name="ZoomLineEdit" type="LineEdit" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer3/PanelContainer/HBoxContainer"]
  274. custom_minimum_size = Vector2(80, 0)
  275. layout_mode = 2
  276. theme_override_styles/focus = SubResource("StyleBoxFlat_6wh7v")
  277. theme_override_styles/normal = SubResource("StyleBoxFlat_wxg4f")
  278. text = "100%"
  279. alignment = 1
  280. select_all_on_focus = true
  281. [node name="MousePositionLabel" type="LineEdit" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer3/PanelContainer/HBoxContainer"]
  282. custom_minimum_size = Vector2(120, 0)
  283. layout_mode = 2
  284. theme_override_styles/focus = SubResource("StyleBoxFlat_y3iko")
  285. theme_override_styles/read_only = SubResource("StyleBoxFlat_g1s0g")
  286. text = "100, 300"
  287. alignment = 1
  288. editable = false
  289. select_all_on_focus = true
  290. [node name="HScrollBar" type="HScrollBar" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer/HBoxContainer3"]
  291. custom_minimum_size = Vector2(0, 20)
  292. layout_mode = 2
  293. size_flags_horizontal = 3
  294. size_flags_vertical = 1
  295. theme_override_styles/scroll = SubResource("StyleBoxFlat_mdsp2")
  296. theme_override_styles/grabber = SubResource("StyleBoxFlat_h83a8")
  297. theme_override_styles/grabber_highlight = SubResource("StyleBoxFlat_oy7qd")
  298. theme_override_styles/grabber_pressed = SubResource("StyleBoxFlat_r4gi2")
  299. page = 25.0
  300. [node name="VBoxContainer2" type="VBoxContainer" parent="CanvasLayer/CanvasRoot/HBoxContainer"]
  301. layout_mode = 2
  302. theme_override_constants/separation = 0
  303. [node name="VScrollBar" type="VScrollBar" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer2"]
  304. custom_minimum_size = Vector2(31, 0)
  305. layout_mode = 2
  306. size_flags_vertical = 3
  307. theme_override_styles/scroll = SubResource("StyleBoxFlat_js1y7")
  308. theme_override_styles/grabber = SubResource("StyleBoxFlat_qullj")
  309. theme_override_styles/grabber_highlight = SubResource("StyleBoxFlat_k5cmw")
  310. theme_override_styles/grabber_pressed = SubResource("StyleBoxFlat_5pxgr")
  311. page = 25.0
  312. [node name="Corner2" type="Panel" parent="CanvasLayer/CanvasRoot/HBoxContainer/VBoxContainer2"]
  313. custom_minimum_size = Vector2(31, 31)
  314. layout_mode = 2
  315. theme_override_styles/panel = SubResource("StyleBoxFlat_0t8rv")