mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 05:54:43 -04:00
Choose how many rows or columns when exporting spritesheet
Also made CreateNewImage.tscn, ScaleImage.tscn and OutlineDialogn.tscn scenes of their own, with their respective scripts.
This commit is contained in:
parent
1a6f6c1cc9
commit
3ae679fe00
10 changed files with 396 additions and 340 deletions
75
Prefabs/Dialogs/CreateNewImage.tscn
Normal file
75
Prefabs/Dialogs/CreateNewImage.tscn
Normal file
|
@ -0,0 +1,75 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://Scripts/Dialogs/CreateNewImage.gd" type="Script" id=1]
|
||||
|
||||
[node name="CreateNewImage" type="ConfirmationDialog"]
|
||||
margin_right = 200.0
|
||||
margin_bottom = 70.0
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
margin_left = 8.0
|
||||
margin_top = 8.0
|
||||
margin_right = 192.0
|
||||
margin_bottom = 34.0
|
||||
|
||||
[node name="ImageSize" type="Label" parent="VBoxContainer"]
|
||||
margin_right = 184.0
|
||||
margin_bottom = 15.0
|
||||
text = "Image Size"
|
||||
|
||||
[node name="OptionsContainer" type="GridContainer" parent="VBoxContainer"]
|
||||
margin_top = 19.0
|
||||
margin_right = 184.0
|
||||
margin_bottom = 76.0
|
||||
custom_constants/vseparation = 4
|
||||
custom_constants/hseparation = 2
|
||||
columns = 2
|
||||
|
||||
[node name="WidthLabel" type="Label" parent="VBoxContainer/OptionsContainer"]
|
||||
margin_top = 1.0
|
||||
margin_right = 75.0
|
||||
margin_bottom = 16.0
|
||||
text = "Width:"
|
||||
|
||||
[node name="WidthValue" type="SpinBox" parent="VBoxContainer/OptionsContainer"]
|
||||
margin_left = 75.0
|
||||
margin_right = 139.0
|
||||
margin_bottom = 17.0
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = 1.0
|
||||
max_value = 16384.0
|
||||
value = 64.0
|
||||
suffix = "px"
|
||||
|
||||
[node name="Height" type="Label" parent="VBoxContainer/OptionsContainer"]
|
||||
margin_top = 19.0
|
||||
margin_right = 75.0
|
||||
margin_bottom = 33.0
|
||||
text = "Height:"
|
||||
|
||||
[node name="HeightValue" type="SpinBox" parent="VBoxContainer/OptionsContainer"]
|
||||
margin_left = 75.0
|
||||
margin_top = 19.0
|
||||
margin_right = 139.0
|
||||
margin_bottom = 34.0
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = 1.0
|
||||
max_value = 16384.0
|
||||
value = 64.0
|
||||
suffix = "px"
|
||||
|
||||
[node name="FillColorLabel" type="Label" parent="VBoxContainer/OptionsContainer"]
|
||||
margin_top = 41.0
|
||||
margin_right = 75.0
|
||||
margin_bottom = 53.0
|
||||
text = "Fill with color:"
|
||||
|
||||
[node name="FillColor" type="ColorPickerButton" parent="VBoxContainer/OptionsContainer"]
|
||||
margin_left = 75.0
|
||||
margin_top = 38.0
|
||||
margin_right = 139.0
|
||||
margin_bottom = 57.0
|
||||
rect_min_size = Vector2( 64, 20 )
|
||||
color = Color( 0, 0, 0, 0 )
|
||||
[connection signal="confirmed" from="." to="." method="_on_CreateNewImage_confirmed"]
|
|
@ -41,6 +41,7 @@ text = "Resize:"
|
|||
margin_left = 50.0
|
||||
margin_right = 124.0
|
||||
margin_bottom = 40.0
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = 10.0
|
||||
max_value = 1000.0
|
||||
step = 10.0
|
||||
|
@ -55,8 +56,9 @@ margin_bottom = 27.0
|
|||
text = "Interpolation:"
|
||||
|
||||
[node name="Interpolation" type="OptionButton" parent="Resize"]
|
||||
margin_right = 41.0
|
||||
margin_bottom = 20.0
|
||||
margin_left = 219.0
|
||||
margin_right = 303.0
|
||||
margin_bottom = 40.0
|
||||
text = "Item 0"
|
||||
items = [ "Nearest", null, false, 0, null, "Bilinear", null, false, 1, null, "Cubic", null, false, 2, null, "Trilinear", null, false, 3, null, "Lanczos", null, true, 4, null ]
|
||||
selected = 0
|
||||
|
@ -68,15 +70,16 @@ margin_top = 8.0
|
|||
margin_right = 507.0
|
||||
margin_bottom = 312.0
|
||||
|
||||
[node name="Label" type="Label" parent="Spritesheet"]
|
||||
margin_top = 145.0
|
||||
margin_right = 60.0
|
||||
margin_bottom = 159.0
|
||||
text = "Columns:"
|
||||
[node name="ColumnsOrRows" type="OptionButton" parent="Spritesheet"]
|
||||
margin_right = 97.0
|
||||
margin_bottom = 304.0
|
||||
text = "Columns"
|
||||
items = [ "Columns", null, false, 0, null, "Rows", null, false, 1, null ]
|
||||
selected = 0
|
||||
|
||||
[node name="VerticalFrames" type="SpinBox" parent="Spritesheet"]
|
||||
margin_left = 64.0
|
||||
margin_right = 138.0
|
||||
[node name="Frames" type="SpinBox" parent="Spritesheet"]
|
||||
margin_left = 101.0
|
||||
margin_right = 175.0
|
||||
margin_bottom = 304.0
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = 1.0
|
||||
|
@ -85,4 +88,5 @@ value = 1.0
|
|||
[connection signal="item_selected" from="ExportOption" to="." method="_on_ExportOption_item_selected"]
|
||||
[connection signal="value_changed" from="Resize/ResizeValue" to="." method="_on_ResizeValue_value_changed"]
|
||||
[connection signal="item_selected" from="Resize/Interpolation" to="." method="_on_Interpolation_item_selected"]
|
||||
[connection signal="value_changed" from="Spritesheet/VerticalFrames" to="." method="_on_VerticalFrames_value_changed"]
|
||||
[connection signal="item_selected" from="Spritesheet/ColumnsOrRows" to="." method="_on_ColumnsOrRows_item_selected"]
|
||||
[connection signal="value_changed" from="Spritesheet/Frames" to="." method="_on_Frames_value_changed"]
|
||||
|
|
59
Prefabs/Dialogs/OutlineDialog.tscn
Normal file
59
Prefabs/Dialogs/OutlineDialog.tscn
Normal file
|
@ -0,0 +1,59 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://Scripts/Dialogs/OutlineDialog.gd" type="Script" id=1]
|
||||
|
||||
[node name="OutlineDialog" type="ConfirmationDialog"]
|
||||
margin_right = 200.0
|
||||
margin_bottom = 70.0
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="OptionsContainer" type="GridContainer" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -92.0
|
||||
margin_top = -27.0
|
||||
margin_right = 92.0
|
||||
margin_bottom = -1.0
|
||||
custom_constants/vseparation = 4
|
||||
custom_constants/hseparation = 4
|
||||
columns = 2
|
||||
|
||||
[node name="ThickLabel" type="Label" parent="OptionsContainer"]
|
||||
margin_top = 5.0
|
||||
margin_right = 139.0
|
||||
margin_bottom = 19.0
|
||||
text = "Thickness:"
|
||||
|
||||
[node name="ThickValue" type="SpinBox" parent="OptionsContainer"]
|
||||
margin_left = 143.0
|
||||
margin_right = 217.0
|
||||
margin_bottom = 24.0
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = 1.0
|
||||
max_value = 16384.0
|
||||
value = 1.0
|
||||
suffix = "px"
|
||||
|
||||
[node name="OutlineColorLabel" type="Label" parent="OptionsContainer"]
|
||||
margin_top = 31.0
|
||||
margin_right = 139.0
|
||||
margin_bottom = 45.0
|
||||
text = "Fill with color:"
|
||||
|
||||
[node name="OutlineColor" type="ColorPickerButton" parent="OptionsContainer"]
|
||||
margin_left = 143.0
|
||||
margin_top = 28.0
|
||||
margin_right = 217.0
|
||||
margin_bottom = 48.0
|
||||
rect_min_size = Vector2( 64, 20 )
|
||||
color = Color( 1, 0, 0, 1 )
|
||||
|
||||
[node name="DiagonalCheckBox" type="CheckBox" parent="OptionsContainer"]
|
||||
margin_top = 52.0
|
||||
margin_right = 139.0
|
||||
margin_bottom = 76.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Diagonal outlines"
|
||||
[connection signal="confirmed" from="." to="." method="_on_OutlineDialog_confirmed"]
|
76
Prefabs/Dialogs/ScaleImage.tscn
Normal file
76
Prefabs/Dialogs/ScaleImage.tscn
Normal file
|
@ -0,0 +1,76 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://Scripts/Dialogs/ScaleImage.gd" type="Script" id=1]
|
||||
|
||||
[node name="ScaleImage" type="ConfirmationDialog"]
|
||||
margin_right = 200.0
|
||||
margin_bottom = 114.0
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
margin_left = 8.0
|
||||
margin_top = 8.0
|
||||
margin_right = 192.0
|
||||
margin_bottom = 78.0
|
||||
|
||||
[node name="ImageSize" type="Label" parent="VBoxContainer"]
|
||||
margin_right = 184.0
|
||||
margin_bottom = 15.0
|
||||
text = "Image Size"
|
||||
|
||||
[node name="OptionsContainer" type="GridContainer" parent="VBoxContainer"]
|
||||
margin_top = 19.0
|
||||
margin_right = 184.0
|
||||
margin_bottom = 90.0
|
||||
custom_constants/vseparation = 4
|
||||
custom_constants/hseparation = 2
|
||||
columns = 2
|
||||
|
||||
[node name="WidthLabel" type="Label" parent="VBoxContainer/OptionsContainer"]
|
||||
margin_top = 5.0
|
||||
margin_right = 72.0
|
||||
margin_bottom = 20.0
|
||||
text = "Width:"
|
||||
|
||||
[node name="WidthValue" type="SpinBox" parent="VBoxContainer/OptionsContainer"]
|
||||
margin_left = 72.0
|
||||
margin_right = 155.0
|
||||
margin_bottom = 25.0
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = 1.0
|
||||
max_value = 16384.0
|
||||
value = 64.0
|
||||
suffix = "px"
|
||||
|
||||
[node name="Height" type="Label" parent="VBoxContainer/OptionsContainer"]
|
||||
margin_top = 30.0
|
||||
margin_right = 72.0
|
||||
margin_bottom = 45.0
|
||||
text = "Height:"
|
||||
|
||||
[node name="HeightValue" type="SpinBox" parent="VBoxContainer/OptionsContainer"]
|
||||
margin_left = 72.0
|
||||
margin_top = 25.0
|
||||
margin_right = 155.0
|
||||
margin_bottom = 50.0
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = 1.0
|
||||
max_value = 16384.0
|
||||
value = 64.0
|
||||
suffix = "px"
|
||||
|
||||
[node name="InterpolationLabel" type="Label" parent="VBoxContainer/OptionsContainer"]
|
||||
margin_top = 53.0
|
||||
margin_right = 72.0
|
||||
margin_bottom = 68.0
|
||||
text = "Interpolation:"
|
||||
|
||||
[node name="InterpolationType" type="OptionButton" parent="VBoxContainer/OptionsContainer"]
|
||||
margin_left = 72.0
|
||||
margin_top = 50.0
|
||||
margin_right = 155.0
|
||||
margin_bottom = 71.0
|
||||
text = "Nearest"
|
||||
items = [ "Nearest", null, false, 0, null, "Bilinear", null, false, 1, null, "Cubic", null, false, 2, null, "Trilinear", null, false, 3, null, "Lanczos", null, true, 4, null ]
|
||||
selected = 0
|
||||
[connection signal="confirmed" from="." to="." method="_on_ScaleImage_confirmed"]
|
Loading…
Add table
Add a link
Reference in a new issue