Files
godot-demo-projects/gui/gd_paint/paint_root.tscn

308 lines
8.5 KiB
Plaintext

[gd_scene load_steps=10 format=3 uid="uid://bhjmyer4wlwy2"]
[ext_resource type="Script" path="res://paint_control.gd" id="1"]
[ext_resource type="Script" path="res://tools_panel.gd" id="2"]
[ext_resource type="Texture2D" uid="uid://cdqq0m3rrlbva" path="res://paint_tools.png" id="3"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4ksjc"]
bg_color = Color(1, 1, 1, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_npkcn"]
bg_color = Color(0.2, 0.2, 0.2, 1)
[sub_resource type="AtlasTexture" id="AtlasTexture_v0gbg"]
atlas = ExtResource( "3" )
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_j7akv"]
atlas = ExtResource( "3" )
region = Rect2(16, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_63q87"]
atlas = ExtResource( "3" )
region = Rect2(0, 16, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_t52fe"]
atlas = ExtResource( "3" )
region = Rect2(16, 16, 16, 16)
[node name="PaintRoot" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
[node name="DrawingAreaBG" type="Panel" parent="."]
anchor_left = 0.342
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -0.208008
grow_horizontal = 2
theme_override_styles/panel = SubResource( "StyleBoxFlat_4ksjc" )
metadata/_edit_layout_mode = 1
metadata/_edit_use_custom_anchors = true
[node name="PaintControl" type="Control" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource( "1" )
metadata/_edit_layout_mode = 1
metadata/_edit_use_custom_anchors = false
[node name="ToolsPanel" type="Panel" parent="."]
offset_right = 350.0
offset_bottom = 600.0
theme_override_styles/panel = SubResource( "StyleBoxFlat_npkcn" )
script = ExtResource( "2" )
metadata/_edit_layout_mode = 1
metadata/_edit_use_custom_anchors = true
[node name="LabelTools" type="Label" parent="ToolsPanel"]
offset_left = 20.0
offset_top = 6.0
offset_right = 330.0
offset_bottom = 32.0
text = "Selected tool: Pencil"
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="ButtonToolPencil" type="Button" parent="ToolsPanel"]
offset_left = 40.0
offset_top = 30.0
offset_right = 95.0
offset_bottom = 85.0
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="TextureRect" type="TextureRect" parent="ToolsPanel/ButtonToolPencil"]
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 5.0
offset_top = 5.0
offset_right = -5.0
offset_bottom = -5.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource( "AtlasTexture_v0gbg" )
metadata/_edit_layout_mode = 1
metadata/_edit_use_custom_anchors = false
[node name="ButtonToolEraser" type="Button" parent="ToolsPanel"]
offset_left = 110.0
offset_top = 30.0
offset_right = 165.0
offset_bottom = 85.0
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="TextureRect2" type="TextureRect" parent="ToolsPanel/ButtonToolEraser"]
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 5.0
offset_top = 5.0
offset_right = -5.0
offset_bottom = -5.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource( "AtlasTexture_j7akv" )
metadata/_edit_layout_mode = 1
metadata/_edit_use_custom_anchors = false
[node name="ButtonToolRectangle" type="Button" parent="ToolsPanel"]
offset_left = 180.0
offset_top = 30.0
offset_right = 235.0
offset_bottom = 85.0
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="TextureRect" type="TextureRect" parent="ToolsPanel/ButtonToolRectangle"]
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 5.0
offset_top = 5.0
offset_right = -5.0
offset_bottom = -5.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource( "AtlasTexture_63q87" )
metadata/_edit_layout_mode = 1
metadata/_edit_use_custom_anchors = false
[node name="ButtonToolCircle" type="Button" parent="ToolsPanel"]
offset_left = 250.0
offset_top = 30.0
offset_right = 305.0
offset_bottom = 85.0
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="TextureRect" type="TextureRect" parent="ToolsPanel/ButtonToolCircle"]
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 5.0
offset_top = 5.0
offset_right = -5.0
offset_bottom = -5.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource( "AtlasTexture_t52fe" )
metadata/_edit_layout_mode = 1
metadata/_edit_use_custom_anchors = false
[node name="LabelBrushColor" type="Label" parent="ToolsPanel"]
offset_left = 20.0
offset_top = 91.0
offset_right = 330.0
offset_bottom = 117.0
text = "Current color"
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="ColorPickerBrush" type="ColorPickerButton" parent="ToolsPanel"]
offset_left = 20.0
offset_top = 115.0
offset_right = 330.0
offset_bottom = 155.0
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="BrushSettings" type="Control" parent="ToolsPanel"]
offset_top = 200.0
offset_right = 350.0
offset_bottom = 375.0
[node name="LabelBrushSize" type="Label" parent="ToolsPanel/BrushSettings"]
offset_left = 20.0
offset_top = -37.0
offset_right = 330.0
offset_bottom = -11.0
text = "Brush size: 32px"
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="HScrollBarBrushSize" type="HScrollBar" parent="ToolsPanel/BrushSettings"]
offset_left = 20.0
offset_top = -8.0
offset_right = 330.0
offset_bottom = 17.0
min_value = 2.0
step = 1.0
value = 32.0
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="LabelBrushShape" type="Label" parent="ToolsPanel/BrushSettings"]
offset_left = 20.0
offset_top = 29.0
offset_right = 330.0
offset_bottom = 55.0
text = "Brush shape: Circle"
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="ButtonShapeBox" type="Button" parent="ToolsPanel/BrushSettings"]
offset_left = 100.0
offset_top = 59.0
offset_right = 155.0
offset_bottom = 114.0
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="TextureRect" type="TextureRect" parent="ToolsPanel/BrushSettings/ButtonShapeBox"]
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 5.0
offset_top = 5.0
offset_right = -5.0
offset_bottom = -5.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource( "AtlasTexture_63q87" )
metadata/_edit_layout_mode = 1
metadata/_edit_use_custom_anchors = false
[node name="ButtonShapeCircle" type="Button" parent="ToolsPanel/BrushSettings"]
offset_left = 190.0
offset_top = 59.0
offset_right = 245.0
offset_bottom = 114.0
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="TextureRect" type="TextureRect" parent="ToolsPanel/BrushSettings/ButtonShapeCircle"]
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 5.0
offset_top = 5.0
offset_right = -5.0
offset_bottom = -5.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource( "AtlasTexture_t52fe" )
metadata/_edit_layout_mode = 1
metadata/_edit_use_custom_anchors = false
[node name="LabelBackgroundColor" type="Label" parent="ToolsPanel"]
offset_left = 20.0
offset_top = 323.0
offset_right = 330.0
offset_bottom = 349.0
text = "Background color"
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="ColorPickerBackground" type="ColorPickerButton" parent="ToolsPanel"]
offset_left = 20.0
offset_top = 351.0
offset_right = 330.0
offset_bottom = 391.0
color = Color(1, 1, 1, 1)
edit_alpha = false
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="LabelStats" type="Label" parent="ToolsPanel"]
modulate = Color(0.414062, 0.414062, 0.414062, 1)
offset_left = 20.0
offset_top = 463.0
offset_right = 330.0
offset_bottom = 489.0
text = "Brush objects: 00000"
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="ButtonUndo" type="Button" parent="ToolsPanel"]
offset_left = 10.0
offset_top = 415.0
offset_right = 340.0
offset_bottom = 450.0
text = "Undo last stroke"
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="ButtonSave" type="Button" parent="ToolsPanel"]
offset_left = 10.0
offset_top = 506.0
offset_right = 340.0
offset_bottom = 541.0
text = "Save picture"
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="ButtonClear" type="Button" parent="ToolsPanel"]
offset_left = 10.0
offset_top = 550.0
offset_right = 340.0
offset_bottom = 585.0
text = "Clear picture"
metadata/_edit_layout_mode = 0
metadata/_edit_use_custom_anchors = false
[node name="SaveFileDialog" type="FileDialog" parent="."]
size = Vector2i(800, 300)
min_size = Vector2i(800, 300)
access = 2
filters = PackedStringArray("*.png")
show_hidden_files = true