paint_root.tscn 8.5 KB

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