paint_root.tscn 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. [gd_scene load_steps=10 format=3 uid="uid://bhjmyer4wlwy2"]
  2. [ext_resource type="Script" path="res://paint_control.gd" id="1"]
  3. [ext_resource type="Script" path="res://tools_panel.gd" id="2"]
  4. [ext_resource type="Texture2D" uid="uid://cdqq0m3rrlbva" path="res://paint_tools.png" id="3"]
  5. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4ksjc"]
  6. bg_color = Color(1, 1, 1, 1)
  7. [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_npkcn"]
  8. bg_color = Color(0.2, 0.2, 0.2, 1)
  9. [sub_resource type="AtlasTexture" id="AtlasTexture_v0gbg"]
  10. atlas = ExtResource("3")
  11. region = Rect2(0, 0, 16, 16)
  12. [sub_resource type="AtlasTexture" id="AtlasTexture_j7akv"]
  13. atlas = ExtResource("3")
  14. region = Rect2(16, 0, 16, 16)
  15. [sub_resource type="AtlasTexture" id="AtlasTexture_63q87"]
  16. atlas = ExtResource("3")
  17. region = Rect2(0, 16, 16, 16)
  18. [sub_resource type="AtlasTexture" id="AtlasTexture_t52fe"]
  19. atlas = ExtResource("3")
  20. region = Rect2(16, 16, 16, 16)
  21. [node name="PaintRoot" type="Control"]
  22. layout_mode = 3
  23. anchors_preset = 15
  24. anchor_right = 1.0
  25. anchor_bottom = 1.0
  26. grow_horizontal = 2
  27. grow_vertical = 2
  28. [node name="DrawingAreaBG" type="Panel" parent="."]
  29. layout_mode = 0
  30. anchor_left = 0.342
  31. anchor_right = 1.0
  32. anchor_bottom = 1.0
  33. offset_left = -0.208008
  34. grow_horizontal = 2
  35. theme_override_styles/panel = SubResource("StyleBoxFlat_4ksjc")
  36. metadata/_edit_layout_mode = 1
  37. metadata/_edit_use_custom_anchors = true
  38. [node name="PaintControl" type="Control" parent="."]
  39. anchors_preset = 0
  40. anchor_right = 1.0
  41. anchor_bottom = 1.0
  42. grow_horizontal = 2
  43. grow_vertical = 2
  44. script = ExtResource("1")
  45. metadata/_edit_layout_mode = 1
  46. metadata/_edit_use_custom_anchors = false
  47. [node name="ToolsPanel" type="Panel" parent="."]
  48. layout_mode = 0
  49. offset_right = 350.0
  50. offset_bottom = 600.0
  51. theme_override_styles/panel = SubResource("StyleBoxFlat_npkcn")
  52. script = ExtResource("2")
  53. metadata/_edit_layout_mode = 1
  54. metadata/_edit_use_custom_anchors = true
  55. [node name="LabelTools" type="Label" parent="ToolsPanel"]
  56. layout_mode = 0
  57. offset_left = 20.0
  58. offset_top = 6.0
  59. offset_right = 330.0
  60. offset_bottom = 32.0
  61. text = "Selected tool: Pencil"
  62. metadata/_edit_layout_mode = 0
  63. metadata/_edit_use_custom_anchors = false
  64. [node name="ButtonToolPencil" type="Button" parent="ToolsPanel"]
  65. layout_mode = 0
  66. offset_left = 40.0
  67. offset_top = 30.0
  68. offset_right = 95.0
  69. offset_bottom = 85.0
  70. metadata/_edit_layout_mode = 0
  71. metadata/_edit_use_custom_anchors = false
  72. [node name="TextureRect" type="TextureRect" parent="ToolsPanel/ButtonToolPencil"]
  73. layout_mode = 0
  74. anchor_right = 1.0
  75. anchor_bottom = 1.0
  76. offset_left = 5.0
  77. offset_top = 5.0
  78. offset_right = -5.0
  79. offset_bottom = -5.0
  80. grow_horizontal = 2
  81. grow_vertical = 2
  82. texture = SubResource("AtlasTexture_v0gbg")
  83. metadata/_edit_layout_mode = 1
  84. metadata/_edit_use_custom_anchors = false
  85. [node name="ButtonToolEraser" type="Button" parent="ToolsPanel"]
  86. layout_mode = 0
  87. offset_left = 110.0
  88. offset_top = 30.0
  89. offset_right = 165.0
  90. offset_bottom = 85.0
  91. metadata/_edit_layout_mode = 0
  92. metadata/_edit_use_custom_anchors = false
  93. [node name="TextureRect2" type="TextureRect" parent="ToolsPanel/ButtonToolEraser"]
  94. layout_mode = 0
  95. anchor_right = 1.0
  96. anchor_bottom = 1.0
  97. offset_left = 5.0
  98. offset_top = 5.0
  99. offset_right = -5.0
  100. offset_bottom = -5.0
  101. grow_horizontal = 2
  102. grow_vertical = 2
  103. texture = SubResource("AtlasTexture_j7akv")
  104. metadata/_edit_layout_mode = 1
  105. metadata/_edit_use_custom_anchors = false
  106. [node name="ButtonToolRectangle" type="Button" parent="ToolsPanel"]
  107. layout_mode = 0
  108. offset_left = 180.0
  109. offset_top = 30.0
  110. offset_right = 235.0
  111. offset_bottom = 85.0
  112. metadata/_edit_layout_mode = 0
  113. metadata/_edit_use_custom_anchors = false
  114. [node name="TextureRect" type="TextureRect" parent="ToolsPanel/ButtonToolRectangle"]
  115. layout_mode = 0
  116. anchor_right = 1.0
  117. anchor_bottom = 1.0
  118. offset_left = 5.0
  119. offset_top = 5.0
  120. offset_right = -5.0
  121. offset_bottom = -5.0
  122. grow_horizontal = 2
  123. grow_vertical = 2
  124. texture = SubResource("AtlasTexture_63q87")
  125. metadata/_edit_layout_mode = 1
  126. metadata/_edit_use_custom_anchors = false
  127. [node name="ButtonToolCircle" type="Button" parent="ToolsPanel"]
  128. layout_mode = 0
  129. offset_left = 250.0
  130. offset_top = 30.0
  131. offset_right = 305.0
  132. offset_bottom = 85.0
  133. metadata/_edit_layout_mode = 0
  134. metadata/_edit_use_custom_anchors = false
  135. [node name="TextureRect" type="TextureRect" parent="ToolsPanel/ButtonToolCircle"]
  136. layout_mode = 0
  137. anchor_right = 1.0
  138. anchor_bottom = 1.0
  139. offset_left = 5.0
  140. offset_top = 5.0
  141. offset_right = -5.0
  142. offset_bottom = -5.0
  143. grow_horizontal = 2
  144. grow_vertical = 2
  145. texture = SubResource("AtlasTexture_t52fe")
  146. metadata/_edit_layout_mode = 1
  147. metadata/_edit_use_custom_anchors = false
  148. [node name="LabelBrushColor" type="Label" parent="ToolsPanel"]
  149. layout_mode = 0
  150. offset_left = 20.0
  151. offset_top = 91.0
  152. offset_right = 330.0
  153. offset_bottom = 117.0
  154. text = "Current color"
  155. metadata/_edit_layout_mode = 0
  156. metadata/_edit_use_custom_anchors = false
  157. [node name="ColorPickerBrush" type="ColorPickerButton" parent="ToolsPanel"]
  158. layout_mode = 0
  159. offset_left = 20.0
  160. offset_top = 115.0
  161. offset_right = 330.0
  162. offset_bottom = 155.0
  163. metadata/_edit_layout_mode = 0
  164. metadata/_edit_use_custom_anchors = false
  165. [node name="BrushSettings" type="Control" parent="ToolsPanel"]
  166. anchors_preset = 0
  167. offset_top = 200.0
  168. offset_right = 350.0
  169. offset_bottom = 375.0
  170. [node name="LabelBrushSize" type="Label" parent="ToolsPanel/BrushSettings"]
  171. layout_mode = 0
  172. offset_left = 20.0
  173. offset_top = -37.0
  174. offset_right = 330.0
  175. offset_bottom = -11.0
  176. text = "Brush size: 32px"
  177. metadata/_edit_layout_mode = 0
  178. metadata/_edit_use_custom_anchors = false
  179. [node name="HScrollBarBrushSize" type="HScrollBar" parent="ToolsPanel/BrushSettings"]
  180. layout_mode = 0
  181. offset_left = 20.0
  182. offset_top = -8.0
  183. offset_right = 330.0
  184. offset_bottom = 17.0
  185. min_value = 2.0
  186. step = 1.0
  187. value = 32.0
  188. metadata/_edit_layout_mode = 0
  189. metadata/_edit_use_custom_anchors = false
  190. [node name="LabelBrushShape" type="Label" parent="ToolsPanel/BrushSettings"]
  191. layout_mode = 0
  192. offset_left = 20.0
  193. offset_top = 29.0
  194. offset_right = 330.0
  195. offset_bottom = 55.0
  196. text = "Brush shape: Circle"
  197. metadata/_edit_layout_mode = 0
  198. metadata/_edit_use_custom_anchors = false
  199. [node name="ButtonShapeBox" type="Button" parent="ToolsPanel/BrushSettings"]
  200. layout_mode = 0
  201. offset_left = 100.0
  202. offset_top = 59.0
  203. offset_right = 155.0
  204. offset_bottom = 114.0
  205. metadata/_edit_layout_mode = 0
  206. metadata/_edit_use_custom_anchors = false
  207. [node name="TextureRect" type="TextureRect" parent="ToolsPanel/BrushSettings/ButtonShapeBox"]
  208. layout_mode = 0
  209. anchor_right = 1.0
  210. anchor_bottom = 1.0
  211. offset_left = 5.0
  212. offset_top = 5.0
  213. offset_right = -5.0
  214. offset_bottom = -5.0
  215. grow_horizontal = 2
  216. grow_vertical = 2
  217. texture = SubResource("AtlasTexture_63q87")
  218. metadata/_edit_layout_mode = 1
  219. metadata/_edit_use_custom_anchors = false
  220. [node name="ButtonShapeCircle" type="Button" parent="ToolsPanel/BrushSettings"]
  221. layout_mode = 0
  222. offset_left = 190.0
  223. offset_top = 59.0
  224. offset_right = 245.0
  225. offset_bottom = 114.0
  226. metadata/_edit_layout_mode = 0
  227. metadata/_edit_use_custom_anchors = false
  228. [node name="TextureRect" type="TextureRect" parent="ToolsPanel/BrushSettings/ButtonShapeCircle"]
  229. layout_mode = 0
  230. anchor_right = 1.0
  231. anchor_bottom = 1.0
  232. offset_left = 5.0
  233. offset_top = 5.0
  234. offset_right = -5.0
  235. offset_bottom = -5.0
  236. grow_horizontal = 2
  237. grow_vertical = 2
  238. texture = SubResource("AtlasTexture_t52fe")
  239. metadata/_edit_layout_mode = 1
  240. metadata/_edit_use_custom_anchors = false
  241. [node name="LabelBackgroundColor" type="Label" parent="ToolsPanel"]
  242. layout_mode = 0
  243. offset_left = 20.0
  244. offset_top = 323.0
  245. offset_right = 330.0
  246. offset_bottom = 349.0
  247. text = "Background color"
  248. metadata/_edit_layout_mode = 0
  249. metadata/_edit_use_custom_anchors = false
  250. [node name="ColorPickerBackground" type="ColorPickerButton" parent="ToolsPanel"]
  251. layout_mode = 0
  252. offset_left = 20.0
  253. offset_top = 351.0
  254. offset_right = 330.0
  255. offset_bottom = 391.0
  256. color = Color(1, 1, 1, 1)
  257. edit_alpha = false
  258. metadata/_edit_layout_mode = 0
  259. metadata/_edit_use_custom_anchors = false
  260. [node name="LabelStats" type="Label" parent="ToolsPanel"]
  261. modulate = Color(0.414062, 0.414062, 0.414062, 1)
  262. layout_mode = 0
  263. offset_left = 20.0
  264. offset_top = 463.0
  265. offset_right = 330.0
  266. offset_bottom = 489.0
  267. text = "Brush objects: 00000"
  268. metadata/_edit_layout_mode = 0
  269. metadata/_edit_use_custom_anchors = false
  270. [node name="ButtonUndo" type="Button" parent="ToolsPanel"]
  271. layout_mode = 0
  272. offset_left = 10.0
  273. offset_top = 415.0
  274. offset_right = 340.0
  275. offset_bottom = 450.0
  276. text = "Undo last stroke"
  277. metadata/_edit_layout_mode = 0
  278. metadata/_edit_use_custom_anchors = false
  279. [node name="ButtonSave" type="Button" parent="ToolsPanel"]
  280. layout_mode = 0
  281. offset_left = 10.0
  282. offset_top = 506.0
  283. offset_right = 340.0
  284. offset_bottom = 541.0
  285. text = "Save picture"
  286. metadata/_edit_layout_mode = 0
  287. metadata/_edit_use_custom_anchors = false
  288. [node name="ButtonClear" type="Button" parent="ToolsPanel"]
  289. layout_mode = 0
  290. offset_left = 10.0
  291. offset_top = 550.0
  292. offset_right = 340.0
  293. offset_bottom = 585.0
  294. text = "Clear picture"
  295. metadata/_edit_layout_mode = 0
  296. metadata/_edit_use_custom_anchors = false
  297. [node name="SaveFileDialog" type="FileDialog" parent="."]
  298. size = Vector2i(800, 300)
  299. min_size = Vector2i(800, 300)
  300. access = 2
  301. filters = PackedStringArray("*.png ; PNG Image", "*.webp ; WebP Image", "*.jpeg, *.jpg ; JPEG Image")
  302. show_hidden_files = true