diff --git a/src/Main.tscn b/src/Main.tscn index abeacaca9..042fddb03 100644 --- a/src/Main.tscn +++ b/src/Main.tscn @@ -1,12 +1,13 @@ -[gd_scene load_steps=22 format=2] +[gd_scene load_steps=19 format=2] [ext_resource path="res://assets/themes/dark/theme.tres" type="Theme" id=1] [ext_resource path="res://src/Main.gd" type="Script" id=2] [ext_resource path="res://src/UI/TopMenuContainer.tscn" type="PackedScene" id=3] [ext_resource path="res://src/UI/UI.tscn" type="PackedScene" id=4] +[ext_resource path="res://src/UI/PatternsPopup.tscn" type="PackedScene" id=5] +[ext_resource path="res://src/UI/BrushesPopup.tscn" type="PackedScene" id=6] [ext_resource path="res://src/UI/Dialogs/SaveSprite.tscn" type="PackedScene" id=11] [ext_resource path="res://src/UI/Dialogs/OpenSprite.tscn" type="PackedScene" id=12] -[ext_resource path="res://src/UI/BrushButton.tscn" type="PackedScene" id=26] [ext_resource path="res://src/UI/Dialogs/SplashDialog.tscn" type="PackedScene" id=27] [ext_resource path="res://src/UI/Dialogs/CreateNewImage.tscn" type="PackedScene" id=28] [ext_resource path="res://src/UI/Dialogs/ImportSprites.tscn" type="PackedScene" id=29] @@ -18,36 +19,6 @@ [ext_resource path="res://src/UI/Dialogs/ExportDialog.tscn" type="PackedScene" id=39] [ext_resource path="res://src/UI/Dialogs/HSVDialog.tscn" type="PackedScene" id=44] -[sub_resource type="Image" id=6] -data = { -"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), -"format": "RGBA8", -"height": 9, -"mipmaps": false, -"width": 9 -} - -[sub_resource type="ImageTexture" id=3] -flags = 3 -flags = 3 -image = SubResource( 6 ) -size = Vector2( 9, 9 ) - -[sub_resource type="Image" id=7] -data = { -"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), -"format": "RGBA8", -"height": 9, -"mipmaps": false, -"width": 9 -} - -[sub_resource type="ImageTexture" id=5] -flags = 3 -flags = 3 -image = SubResource( 7 ) -size = Vector2( 9, 9 ) - [node name="Control" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 @@ -71,90 +42,9 @@ __meta__ = { [node name="UI" parent="MenuAndUI" instance=ExtResource( 4 )] -[node name="BrushesPopup" type="Popup" parent="."] -margin_right = 226.0 -margin_bottom = 144.0 -rect_min_size = Vector2( 0, 144 ) +[node name="BrushesPopup" parent="." instance=ExtResource( 6 )] -[node name="TabContainer" type="TabContainer" parent="BrushesPopup"] -anchor_right = 1.0 -anchor_bottom = 1.0 -size_flags_vertical = 3 -drag_to_rearrange_enabled = true - -[node name="File" type="ScrollContainer" parent="BrushesPopup/TabContainer"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 5.0 -margin_top = 39.0 -margin_right = -5.0 -margin_bottom = -5.0 -rect_min_size = Vector2( 0, 36 ) -size_flags_horizontal = 3 -scroll_horizontal_enabled = false - -[node name="FileBrushContainer" type="GridContainer" parent="BrushesPopup/TabContainer/File"] -margin_right = 102.0 -margin_bottom = 32.0 -columns = 6 - -[node name="PixelBrushButton" parent="BrushesPopup/TabContainer/File/FileBrushContainer" instance=ExtResource( 26 )] -hint_tooltip = "Pixel brush" -mouse_default_cursor_shape = 2 - -[node name="CircleBrushButton" parent="BrushesPopup/TabContainer/File/FileBrushContainer" instance=ExtResource( 26 )] -margin_left = 35.0 -margin_right = 67.0 -hint_tooltip = "Filled circle brush" -mouse_default_cursor_shape = 2 -brush_type = 1 -custom_brush_index = -2 - -[node name="BrushTexture" parent="BrushesPopup/TabContainer/File/FileBrushContainer/CircleBrushButton" index="0"] -texture = SubResource( 3 ) - -[node name="FilledCircleBrushButton" parent="BrushesPopup/TabContainer/File/FileBrushContainer" instance=ExtResource( 26 )] -margin_left = 70.0 -margin_right = 102.0 -hint_tooltip = "Circle brush" -mouse_default_cursor_shape = 2 -brush_type = 2 -custom_brush_index = -1 - -[node name="BrushTexture" parent="BrushesPopup/TabContainer/File/FileBrushContainer/FilledCircleBrushButton" index="0"] -texture = SubResource( 5 ) - -[node name="Project" type="ScrollContainer" parent="BrushesPopup/TabContainer"] -visible = false -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 5.0 -margin_top = 39.0 -margin_right = -5.0 -margin_bottom = -5.0 -rect_min_size = Vector2( 0, 36 ) -size_flags_horizontal = 3 -scroll_horizontal_enabled = false - -[node name="ProjectBrushContainer" type="GridContainer" parent="BrushesPopup/TabContainer/Project"] -columns = 5 - -[node name="PatternsPopup" type="PopupPanel" parent="."] -margin_right = 226.0 -margin_bottom = 104.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ScrollContainer" type="ScrollContainer" parent="PatternsPopup"] -anchor_right = 1.0 -anchor_bottom = 1.0 -rect_min_size = Vector2( 0, 36 ) -size_flags_horizontal = 3 -scroll_horizontal_enabled = false - -[node name="PatternContainer" type="GridContainer" parent="PatternsPopup/ScrollContainer"] -columns = 6 +[node name="PatternsPopup" parent="." instance=ExtResource( 5 )] [node name="SplashDialog" parent="." instance=ExtResource( 27 )] @@ -247,7 +137,3 @@ visible = false [connection signal="popup_hide" from="ErrorDialog" to="." method="_can_draw_true"] [connection signal="popup_hide" from="HSVDialog" to="." method="_can_draw_true"] [connection signal="popup_hide" from="BackupConfirmation" to="." method="_can_draw_true"] - -[editable path="BrushesPopup/TabContainer/File/FileBrushContainer/CircleBrushButton"] - -[editable path="BrushesPopup/TabContainer/File/FileBrushContainer/FilledCircleBrushButton"] diff --git a/src/UI/BrushesPopup.tscn b/src/UI/BrushesPopup.tscn new file mode 100644 index 000000000..7217e687d --- /dev/null +++ b/src/UI/BrushesPopup.tscn @@ -0,0 +1,65 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://src/UI/BrushButton.tscn" type="PackedScene" id=2] + +[node name="BrushesPopup" type="Popup"] +margin_right = 226.0 +margin_bottom = 144.0 +rect_min_size = Vector2( 0, 144 ) + +[node name="TabContainer" type="TabContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_vertical = 3 +drag_to_rearrange_enabled = true + +[node name="File" type="ScrollContainer" parent="TabContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 4.0 +margin_top = 32.0 +margin_right = -4.0 +margin_bottom = -4.0 +rect_min_size = Vector2( 0, 36 ) +size_flags_horizontal = 3 +scroll_horizontal_enabled = false + +[node name="FileBrushContainer" type="GridContainer" parent="TabContainer/File"] +margin_right = 104.0 +margin_bottom = 32.0 +columns = 6 + +[node name="PixelBrushButton" parent="TabContainer/File/FileBrushContainer" instance=ExtResource( 2 )] +hint_tooltip = "Pixel brush" +mouse_default_cursor_shape = 2 + +[node name="CircleBrushButton" parent="TabContainer/File/FileBrushContainer" instance=ExtResource( 2 )] +margin_left = 35.0 +margin_right = 67.0 +hint_tooltip = "Filled circle brush" +mouse_default_cursor_shape = 2 +brush_type = 1 +custom_brush_index = -2 + +[node name="FilledCircleBrushButton" parent="TabContainer/File/FileBrushContainer" instance=ExtResource( 2 )] +margin_left = 70.0 +margin_right = 102.0 +hint_tooltip = "Circle brush" +mouse_default_cursor_shape = 2 +brush_type = 2 +custom_brush_index = -1 + +[node name="Project" type="ScrollContainer" parent="TabContainer"] +visible = false +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 4.0 +margin_top = 32.0 +margin_right = -4.0 +margin_bottom = -4.0 +rect_min_size = Vector2( 0, 36 ) +size_flags_horizontal = 3 +scroll_horizontal_enabled = false + +[node name="ProjectBrushContainer" type="GridContainer" parent="TabContainer/Project"] +columns = 5 diff --git a/src/UI/PatternsPopup.tscn b/src/UI/PatternsPopup.tscn new file mode 100644 index 000000000..4484b2d16 --- /dev/null +++ b/src/UI/PatternsPopup.tscn @@ -0,0 +1,22 @@ +[gd_scene format=2] + +[node name="PatternsPopup" type="PopupPanel"] +margin_right = 226.0 +margin_bottom = 104.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ScrollContainer" type="ScrollContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 4.0 +margin_top = 4.0 +margin_right = -4.0 +margin_bottom = -4.0 +rect_min_size = Vector2( 0, 36 ) +size_flags_horizontal = 3 +scroll_horizontal_enabled = false + +[node name="PatternContainer" type="GridContainer" parent="ScrollContainer"] +columns = 6