2019-11-27 06:09:09 +01:00
|
|
|
[gd_scene load_steps=17 format=2]
|
2019-08-04 09:57:42 +02:00
|
|
|
|
|
|
|
[ext_resource path="res://addons/graphics_editor/Editor.gd" type="Script" id=1]
|
|
|
|
[ext_resource path="res://addons/graphics_editor/PaintCanvasContainer.gd" type="Script" id=2]
|
2019-11-23 12:33:43 +01:00
|
|
|
[ext_resource path="res://addons/graphics_editor/Camera2D.gd" type="Script" id=3]
|
|
|
|
[ext_resource path="res://addons/graphics_editor/PaintCanvas.tscn" type="PackedScene" id=4]
|
|
|
|
[ext_resource path="res://addons/graphics_editor/PixelCursorHighlight.gd" type="Script" id=5]
|
|
|
|
[ext_resource path="res://addons/graphics_editor/VisualGrid.tscn" type="PackedScene" id=6]
|
|
|
|
[ext_resource path="res://addons/graphics_editor/CanvasOutline.gd" type="Script" id=7]
|
|
|
|
[ext_resource path="res://addons/graphics_editor/Navbar.gd" type="Script" id=8]
|
2019-11-24 20:12:55 +01:00
|
|
|
[ext_resource path="res://addons/graphics_editor/ColorPicker.gd" type="Script" id=9]
|
|
|
|
[ext_resource path="res://addons/graphics_editor/Layers.gd" type="Script" id=10]
|
|
|
|
[ext_resource path="res://addons/graphics_editor/TextInfo.gd" type="Script" id=11]
|
2019-11-27 06:09:09 +01:00
|
|
|
[ext_resource path="res://addons/graphics_editor/Dialogs.gd" type="Script" id=12]
|
|
|
|
[ext_resource path="res://addons/graphics_editor/Dialogs/SaveFileDialog.gd" type="Script" id=13]
|
|
|
|
[ext_resource path="res://addons/graphics_editor/Dialogs/LoadFileDialog.gd" type="Script" id=14]
|
|
|
|
[ext_resource path="res://addons/graphics_editor/ToolManager.gd" type="Script" id=15]
|
2019-11-23 12:33:43 +01:00
|
|
|
|
|
|
|
[sub_resource type="World" id=1]
|
2019-08-04 09:57:42 +02:00
|
|
|
|
|
|
|
[node name="Editor" type="Control"]
|
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
|
|
|
rect_min_size = Vector2( 1024, 300 )
|
|
|
|
rect_clip_content = true
|
|
|
|
script = ExtResource( 1 )
|
2019-11-23 12:33:43 +01:00
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
2019-08-04 09:57:42 +02:00
|
|
|
|
|
|
|
[node name="PaintCanvasContainer" type="Control" parent="."]
|
|
|
|
show_behind_parent = true
|
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
|
|
|
margin_top = 20.0
|
|
|
|
margin_right = -114.0
|
|
|
|
margin_bottom = -40.0
|
|
|
|
focus_mode = 1
|
|
|
|
mouse_filter = 1
|
|
|
|
script = ExtResource( 2 )
|
|
|
|
__meta__ = {
|
|
|
|
"_edit_lock_": true
|
|
|
|
}
|
|
|
|
|
2019-11-24 09:33:45 +01:00
|
|
|
[node name="Background" type="ColorRect" parent="PaintCanvasContainer"]
|
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
|
|
|
color = Color( 0.192157, 0.192157, 0.192157, 1 )
|
|
|
|
|
2019-11-23 12:33:43 +01:00
|
|
|
[node name="ViewportContainer" type="ViewportContainer" parent="PaintCanvasContainer"]
|
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
|
|
|
mouse_filter = 1
|
|
|
|
stretch = true
|
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
|
|
|
|
|
|
|
[node name="Viewport" type="Viewport" parent="PaintCanvasContainer/ViewportContainer"]
|
|
|
|
size = Vector2( 910, 540 )
|
|
|
|
world = SubResource( 1 )
|
|
|
|
transparent_bg = true
|
|
|
|
handle_input_locally = false
|
|
|
|
render_target_update_mode = 3
|
|
|
|
|
|
|
|
[node name="Camera2D" type="Camera2D" parent="PaintCanvasContainer/ViewportContainer/Viewport"]
|
|
|
|
anchor_mode = 0
|
|
|
|
current = true
|
|
|
|
script = ExtResource( 3 )
|
|
|
|
|
|
|
|
[node name="PaintCanvas" parent="PaintCanvasContainer/ViewportContainer/Viewport" instance=ExtResource( 4 )]
|
2019-08-04 09:57:42 +02:00
|
|
|
anchor_right = 0.0
|
|
|
|
anchor_bottom = 0.0
|
|
|
|
margin_right = 1600.0
|
|
|
|
margin_bottom = 1600.0
|
|
|
|
|
2019-11-23 12:33:43 +01:00
|
|
|
[node name="PixelCursorHighlight" type="Control" parent="PaintCanvasContainer/ViewportContainer/Viewport/PaintCanvas"]
|
2019-08-04 09:57:42 +02:00
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
|
|
|
mouse_filter = 2
|
2019-11-23 12:33:43 +01:00
|
|
|
script = ExtResource( 5 )
|
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
|
|
|
|
|
|
|
[node name="Grids" type="Control" parent="PaintCanvasContainer/ViewportContainer/Viewport/PaintCanvas"]
|
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
|
|
|
mouse_filter = 2
|
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
2019-08-04 09:57:42 +02:00
|
|
|
|
2019-11-23 12:33:43 +01:00
|
|
|
[node name="VisualGrid" parent="PaintCanvasContainer/ViewportContainer/Viewport/PaintCanvas/Grids" instance=ExtResource( 6 )]
|
2019-08-04 09:57:42 +02:00
|
|
|
mouse_filter = 2
|
|
|
|
color = Color( 0.639216, 0.639216, 0.639216, 1 )
|
|
|
|
|
2019-11-23 12:33:43 +01:00
|
|
|
[node name="VisualGrid2" parent="PaintCanvasContainer/ViewportContainer/Viewport/PaintCanvas/Grids" instance=ExtResource( 6 )]
|
2019-08-04 09:57:42 +02:00
|
|
|
mouse_filter = 2
|
|
|
|
color = Color( 1, 1, 1, 1 )
|
2019-11-23 12:33:43 +01:00
|
|
|
size = 160.0
|
2019-08-04 09:57:42 +02:00
|
|
|
|
2019-11-23 12:33:43 +01:00
|
|
|
[node name="CanvasOutline" type="Control" parent="PaintCanvasContainer/ViewportContainer/Viewport/PaintCanvas"]
|
2019-08-04 09:57:42 +02:00
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
|
|
|
mouse_filter = 2
|
2019-11-23 12:33:43 +01:00
|
|
|
script = ExtResource( 7 )
|
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
2019-08-04 09:57:42 +02:00
|
|
|
color = Color( 0, 1, 0, 1 )
|
2019-11-23 12:33:43 +01:00
|
|
|
width = 3.0
|
2019-08-04 09:57:42 +02:00
|
|
|
|
|
|
|
[node name="Navbar" type="Control" parent="."]
|
|
|
|
anchor_right = 1.0
|
|
|
|
margin_bottom = 20.0
|
2019-11-23 12:33:43 +01:00
|
|
|
script = ExtResource( 8 )
|
2019-08-04 09:57:42 +02:00
|
|
|
|
|
|
|
[node name="Panel" type="Panel" parent="Navbar"]
|
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
|
|
|
|
|
|
|
[node name="Buttons" type="Control" parent="Navbar"]
|
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
2019-11-23 12:33:43 +01:00
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
2019-08-04 09:57:42 +02:00
|
|
|
|
|
|
|
[node name="ToolMenu" type="Control" parent="."]
|
|
|
|
anchor_left = 1.0
|
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
|
|
|
margin_left = -114.0
|
|
|
|
margin_top = 20.0
|
|
|
|
margin_bottom = -40.0
|
2019-11-23 12:33:43 +01:00
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
2019-08-04 09:57:42 +02:00
|
|
|
|
|
|
|
[node name="Buttons" type="Control" parent="ToolMenu"]
|
|
|
|
anchor_right = 1.0
|
|
|
|
margin_bottom = 310.0
|
|
|
|
|
|
|
|
[node name="PaintTool" type="Button" parent="ToolMenu/Buttons"]
|
|
|
|
anchor_right = 1.0
|
|
|
|
margin_bottom = 70.0
|
2019-11-23 12:33:43 +01:00
|
|
|
focus_mode = 0
|
|
|
|
enabled_focus_mode = 0
|
2019-08-04 09:57:42 +02:00
|
|
|
text = "Paint Tool"
|
2019-11-23 12:33:43 +01:00
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
2019-08-04 09:57:42 +02:00
|
|
|
|
|
|
|
[node name="BucketTool" type="Button" parent="ToolMenu/Buttons"]
|
|
|
|
anchor_right = 1.0
|
|
|
|
margin_top = 70.0
|
|
|
|
margin_bottom = 140.0
|
2019-11-23 12:33:43 +01:00
|
|
|
focus_mode = 0
|
|
|
|
enabled_focus_mode = 0
|
2019-08-04 09:57:42 +02:00
|
|
|
text = "Bucket Tool"
|
2019-11-23 12:33:43 +01:00
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
2019-08-04 09:57:42 +02:00
|
|
|
|
|
|
|
[node name="RainbowTool" type="Button" parent="ToolMenu/Buttons"]
|
|
|
|
anchor_right = 1.0
|
|
|
|
margin_top = 140.0
|
|
|
|
margin_bottom = 210.0
|
2019-11-23 12:33:43 +01:00
|
|
|
focus_mode = 0
|
|
|
|
enabled_focus_mode = 0
|
2019-08-04 09:57:42 +02:00
|
|
|
text = "Rainbow Tool"
|
2019-11-23 12:33:43 +01:00
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
2019-08-04 09:57:42 +02:00
|
|
|
|
|
|
|
[node name="ColorPicker" type="ColorPickerButton" parent="ToolMenu/Buttons"]
|
|
|
|
anchor_right = 1.0
|
|
|
|
margin_top = 210.0
|
|
|
|
margin_bottom = 240.0
|
2019-11-23 12:33:43 +01:00
|
|
|
focus_mode = 0
|
|
|
|
enabled_focus_mode = 0
|
2019-11-24 20:12:55 +01:00
|
|
|
script = ExtResource( 9 )
|
2019-11-23 12:33:43 +01:00
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
2019-08-04 09:57:42 +02:00
|
|
|
|
|
|
|
[node name="Layers" type="Control" parent="ToolMenu"]
|
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
2019-11-23 12:33:43 +01:00
|
|
|
margin_top = 240.0
|
2019-11-24 20:12:55 +01:00
|
|
|
script = ExtResource( 10 )
|
2019-11-23 12:33:43 +01:00
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
|
|
|
|
|
|
|
[node name="Panel" type="Panel" parent="ToolMenu/Layers"]
|
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
2019-08-04 09:57:42 +02:00
|
|
|
|
2019-11-23 12:33:43 +01:00
|
|
|
[node name="ScrollContainer" type="ScrollContainer" parent="ToolMenu/Layers/Panel"]
|
2019-08-04 09:57:42 +02:00
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
2019-11-23 12:33:43 +01:00
|
|
|
margin_top = 20.0
|
|
|
|
|
|
|
|
[node name="VBoxContainer" type="VBoxContainer" parent="ToolMenu/Layers/Panel/ScrollContainer"]
|
|
|
|
margin_right = 100.0
|
|
|
|
margin_bottom = 90.0
|
|
|
|
|
|
|
|
[node name="AddLayer" type="Button" parent="ToolMenu/Layers/Panel"]
|
|
|
|
margin_left = 90.0
|
|
|
|
margin_right = 110.0
|
|
|
|
margin_bottom = 20.0
|
|
|
|
text = "+"
|
|
|
|
|
|
|
|
[node name="Label" type="Label" parent="ToolMenu/Layers/Panel"]
|
|
|
|
margin_left = 4.0
|
|
|
|
margin_right = 74.0
|
|
|
|
margin_bottom = 20.0
|
|
|
|
text = "Add Layer:"
|
|
|
|
align = 1
|
|
|
|
valign = 1
|
2019-08-04 09:57:42 +02:00
|
|
|
|
|
|
|
[node name="BottomPanel" type="Panel" parent="."]
|
|
|
|
anchor_top = 1.0
|
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
|
|
|
margin_top = -40.0
|
2019-11-23 12:33:43 +01:00
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
2019-08-04 09:57:42 +02:00
|
|
|
|
|
|
|
[node name="TextInfo" type="Control" parent="BottomPanel"]
|
2019-11-24 20:12:55 +01:00
|
|
|
script = ExtResource( 11 )
|
2019-11-23 12:33:43 +01:00
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
2019-08-04 09:57:42 +02:00
|
|
|
|
2019-11-27 06:09:09 +01:00
|
|
|
[node name="Dialogs" type="Control" parent="."]
|
2019-11-29 09:26:01 +01:00
|
|
|
editor/display_folded = true
|
2019-11-27 06:09:09 +01:00
|
|
|
anchor_right = 1.0
|
|
|
|
anchor_bottom = 1.0
|
|
|
|
mouse_filter = 2
|
|
|
|
script = ExtResource( 12 )
|
|
|
|
__meta__ = {
|
|
|
|
"_edit_lock_": true
|
|
|
|
}
|
|
|
|
|
|
|
|
[node name="SaveFileDialog" type="FileDialog" parent="Dialogs"]
|
2019-08-04 09:57:42 +02:00
|
|
|
anchor_left = 0.5
|
|
|
|
anchor_top = 0.5
|
|
|
|
anchor_right = 0.5
|
|
|
|
anchor_bottom = 0.5
|
|
|
|
margin_left = -340.0
|
|
|
|
margin_top = -165.0
|
|
|
|
margin_right = 340.0
|
|
|
|
margin_bottom = 165.0
|
|
|
|
filters = PoolStringArray( "*.png ; PNG Images" )
|
2019-11-27 06:09:09 +01:00
|
|
|
script = ExtResource( 13 )
|
2019-11-23 12:33:43 +01:00
|
|
|
|
2019-11-27 06:09:09 +01:00
|
|
|
[node name="LoadFileDialog" type="FileDialog" parent="Dialogs"]
|
2019-11-23 12:33:43 +01:00
|
|
|
anchor_left = 0.5
|
|
|
|
anchor_top = 0.5
|
|
|
|
anchor_right = 0.5
|
|
|
|
anchor_bottom = 0.5
|
|
|
|
margin_left = -340.0
|
|
|
|
margin_top = -165.0
|
|
|
|
margin_right = 340.0
|
|
|
|
margin_bottom = 165.0
|
|
|
|
window_title = "Open a File"
|
|
|
|
mode = 0
|
|
|
|
filters = PoolStringArray( "*.png ; PNG Images" )
|
2019-11-27 06:09:09 +01:00
|
|
|
script = ExtResource( 14 )
|
2019-11-23 12:33:43 +01:00
|
|
|
__meta__ = {
|
|
|
|
"_edit_use_anchors_": false
|
|
|
|
}
|
|
|
|
|
|
|
|
[node name="ToolManager" type="Node" parent="."]
|
2019-11-27 06:09:09 +01:00
|
|
|
script = ExtResource( 15 )
|
2019-08-04 09:57:42 +02:00
|
|
|
[connection signal="mouse_entered" from="PaintCanvasContainer" to="PaintCanvasContainer" method="_on_PaintCanvasContainer_mouse_entered"]
|
|
|
|
[connection signal="mouse_exited" from="PaintCanvasContainer" to="PaintCanvasContainer" method="_on_PaintCanvasContainer_mouse_exited"]
|
|
|
|
[connection signal="pressed" from="ToolMenu/Buttons/PaintTool" to="." method="_on_PaintTool_pressed"]
|
|
|
|
[connection signal="pressed" from="ToolMenu/Buttons/BucketTool" to="." method="_on_BucketTool_pressed"]
|
|
|
|
[connection signal="pressed" from="ToolMenu/Buttons/RainbowTool" to="." method="_on_RainbowTool_pressed"]
|
|
|
|
[connection signal="color_changed" from="ToolMenu/Buttons/ColorPicker" to="." method="_on_ColorPicker_color_changed"]
|
2019-08-08 10:49:17 +02:00
|
|
|
[connection signal="focus_exited" from="ToolMenu/Buttons/ColorPicker" to="ToolMenu/Buttons/ColorPicker" method="_on_ColorPicker_focus_exited"]
|
|
|
|
[connection signal="mouse_entered" from="ToolMenu/Buttons/ColorPicker" to="ToolMenu/Buttons/ColorPicker" method="_on_ColorPicker_mouse_entered"]
|
|
|
|
[connection signal="mouse_exited" from="ToolMenu/Buttons/ColorPicker" to="ToolMenu/Buttons/ColorPicker" method="_on_ColorPicker_mouse_exited"]
|
2019-11-23 12:33:43 +01:00
|
|
|
[connection signal="pressed" from="ToolMenu/Layers/Panel/AddLayer" to="ToolMenu/Layers" method="_on_AddLayer_pressed"]
|
2019-11-27 06:09:09 +01:00
|
|
|
[connection signal="about_to_show" from="Dialogs/SaveFileDialog" to="Dialogs/SaveFileDialog" method="_on_SaveFileDialog_about_to_show"]
|
|
|
|
[connection signal="confirmed" from="Dialogs/SaveFileDialog" to="Dialogs/SaveFileDialog" method="_on_SaveFileDialog_confirmed"]
|
|
|
|
[connection signal="file_selected" from="Dialogs/SaveFileDialog" to="Dialogs/SaveFileDialog" method="_on_SaveFileDialog_file_selected"]
|
|
|
|
[connection signal="visibility_changed" from="Dialogs/SaveFileDialog" to="Dialogs/SaveFileDialog" method="_on_SaveFileDialog_visibility_changed"]
|
|
|
|
[connection signal="about_to_show" from="Dialogs/LoadFileDialog" to="Dialogs/LoadFileDialog" method="_on_LoadFileDialog_about_to_show"]
|
|
|
|
[connection signal="confirmed" from="Dialogs/LoadFileDialog" to="Dialogs/LoadFileDialog" method="_on_LoadFileDialog_confirmed"]
|
|
|
|
[connection signal="file_selected" from="Dialogs/LoadFileDialog" to="Dialogs/LoadFileDialog" method="_on_LoadFileDialog_file_selected"]
|
|
|
|
[connection signal="visibility_changed" from="Dialogs/LoadFileDialog" to="Dialogs/LoadFileDialog" method="_on_LoadFileDialog_visibility_changed"]
|