diff --git a/Assets/Graphics/Dark Themes/Tools/Zoom.png b/Assets/Graphics/Dark Themes/Tools/Zoom.png new file mode 100644 index 000000000..81d3987f1 Binary files /dev/null and b/Assets/Graphics/Dark Themes/Tools/Zoom.png differ diff --git a/Assets/Graphics/Dark Themes/Tools/Zoom.png.import b/Assets/Graphics/Dark Themes/Tools/Zoom.png.import new file mode 100644 index 000000000..f3c986f39 --- /dev/null +++ b/Assets/Graphics/Dark Themes/Tools/Zoom.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Zoom.png-a9bffd47e4782e488e6ddfb83fa57151.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Dark Themes/Tools/Zoom.png" +dest_files=[ "res://.import/Zoom.png-a9bffd47e4782e488e6ddfb83fa57151.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Assets/Graphics/Dark Themes/Tools/Zoom_l.png b/Assets/Graphics/Dark Themes/Tools/Zoom_l.png new file mode 100644 index 000000000..48401609a Binary files /dev/null and b/Assets/Graphics/Dark Themes/Tools/Zoom_l.png differ diff --git a/Assets/Graphics/Dark Themes/Tools/Zoom_l.png.import b/Assets/Graphics/Dark Themes/Tools/Zoom_l.png.import new file mode 100644 index 000000000..07c61d396 --- /dev/null +++ b/Assets/Graphics/Dark Themes/Tools/Zoom_l.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Zoom_l.png-14bf87f6d158434f443d987344490236.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Dark Themes/Tools/Zoom_l.png" +dest_files=[ "res://.import/Zoom_l.png-14bf87f6d158434f443d987344490236.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Assets/Graphics/Dark Themes/Tools/Zoom_l_r.png b/Assets/Graphics/Dark Themes/Tools/Zoom_l_r.png new file mode 100644 index 000000000..5a081d1b9 Binary files /dev/null and b/Assets/Graphics/Dark Themes/Tools/Zoom_l_r.png differ diff --git a/Assets/Graphics/Dark Themes/Tools/Zoom_l_r.png.import b/Assets/Graphics/Dark Themes/Tools/Zoom_l_r.png.import new file mode 100644 index 000000000..554c8f693 --- /dev/null +++ b/Assets/Graphics/Dark Themes/Tools/Zoom_l_r.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Zoom_l_r.png-109d1f72522d6c5377b11e54679918aa.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Dark Themes/Tools/Zoom_l_r.png" +dest_files=[ "res://.import/Zoom_l_r.png-109d1f72522d6c5377b11e54679918aa.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Assets/Graphics/Dark Themes/Tools/Zoom_r.png b/Assets/Graphics/Dark Themes/Tools/Zoom_r.png new file mode 100644 index 000000000..a5e4ec339 Binary files /dev/null and b/Assets/Graphics/Dark Themes/Tools/Zoom_r.png differ diff --git a/Assets/Graphics/Dark Themes/Tools/Zoom_r.png.import b/Assets/Graphics/Dark Themes/Tools/Zoom_r.png.import new file mode 100644 index 000000000..daca9428a --- /dev/null +++ b/Assets/Graphics/Dark Themes/Tools/Zoom_r.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Zoom_r.png-ababd5793227277c9a7e54c4ae265baf.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Dark Themes/Tools/Zoom_r.png" +dest_files=[ "res://.import/Zoom_r.png-ababd5793227277c9a7e54c4ae265baf.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Assets/Graphics/Gold Themes/Tools/Zoom.png b/Assets/Graphics/Gold Themes/Tools/Zoom.png new file mode 100644 index 000000000..03e81019c Binary files /dev/null and b/Assets/Graphics/Gold Themes/Tools/Zoom.png differ diff --git a/Assets/Graphics/Gold Themes/Tools/Zoom.png.import b/Assets/Graphics/Gold Themes/Tools/Zoom.png.import new file mode 100644 index 000000000..f2fca96f3 --- /dev/null +++ b/Assets/Graphics/Gold Themes/Tools/Zoom.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Zoom.png-7499ccd8f65f59da83fbe8cc18e23119.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Gold Themes/Tools/Zoom.png" +dest_files=[ "res://.import/Zoom.png-7499ccd8f65f59da83fbe8cc18e23119.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Assets/Graphics/Gold Themes/Tools/Zoom_l.png b/Assets/Graphics/Gold Themes/Tools/Zoom_l.png new file mode 100644 index 000000000..443b6f64c Binary files /dev/null and b/Assets/Graphics/Gold Themes/Tools/Zoom_l.png differ diff --git a/Assets/Graphics/Gold Themes/Tools/Zoom_l.png.import b/Assets/Graphics/Gold Themes/Tools/Zoom_l.png.import new file mode 100644 index 000000000..ed3079be0 --- /dev/null +++ b/Assets/Graphics/Gold Themes/Tools/Zoom_l.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Zoom_l.png-a2f1c7a4df39b3a7fa5f56d009a1a351.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Gold Themes/Tools/Zoom_l.png" +dest_files=[ "res://.import/Zoom_l.png-a2f1c7a4df39b3a7fa5f56d009a1a351.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Assets/Graphics/Gold Themes/Tools/Zoom_l_r.png b/Assets/Graphics/Gold Themes/Tools/Zoom_l_r.png new file mode 100644 index 000000000..1ab36f5d5 Binary files /dev/null and b/Assets/Graphics/Gold Themes/Tools/Zoom_l_r.png differ diff --git a/Assets/Graphics/Gold Themes/Tools/Zoom_l_r.png.import b/Assets/Graphics/Gold Themes/Tools/Zoom_l_r.png.import new file mode 100644 index 000000000..d821c8075 --- /dev/null +++ b/Assets/Graphics/Gold Themes/Tools/Zoom_l_r.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Zoom_l_r.png-cabe5dd2cb254a46d23c6fdc1e8dbe3d.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Gold Themes/Tools/Zoom_l_r.png" +dest_files=[ "res://.import/Zoom_l_r.png-cabe5dd2cb254a46d23c6fdc1e8dbe3d.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Assets/Graphics/Gold Themes/Tools/Zoom_r.png b/Assets/Graphics/Gold Themes/Tools/Zoom_r.png new file mode 100644 index 000000000..50534ae42 Binary files /dev/null and b/Assets/Graphics/Gold Themes/Tools/Zoom_r.png differ diff --git a/Assets/Graphics/Gold Themes/Tools/Zoom_r.png.import b/Assets/Graphics/Gold Themes/Tools/Zoom_r.png.import new file mode 100644 index 000000000..d4eca9f2b --- /dev/null +++ b/Assets/Graphics/Gold Themes/Tools/Zoom_r.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Zoom_r.png-781b021685e593e8b3bb53d35616af62.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Gold Themes/Tools/Zoom_r.png" +dest_files=[ "res://.import/Zoom_r.png-781b021685e593e8b3bb53d35616af62.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Assets/Graphics/Light Themes/Tools/Zoom.png b/Assets/Graphics/Light Themes/Tools/Zoom.png new file mode 100644 index 000000000..e5b81fcd8 Binary files /dev/null and b/Assets/Graphics/Light Themes/Tools/Zoom.png differ diff --git a/Assets/Graphics/Light Themes/Tools/Zoom.png.import b/Assets/Graphics/Light Themes/Tools/Zoom.png.import new file mode 100644 index 000000000..a8c583707 --- /dev/null +++ b/Assets/Graphics/Light Themes/Tools/Zoom.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Zoom.png-0365e1ce91fbabb42513755db7e593c3.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Light Themes/Tools/Zoom.png" +dest_files=[ "res://.import/Zoom.png-0365e1ce91fbabb42513755db7e593c3.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Assets/Graphics/Light Themes/Tools/Zoom_l.png b/Assets/Graphics/Light Themes/Tools/Zoom_l.png new file mode 100644 index 000000000..07c20aeaa Binary files /dev/null and b/Assets/Graphics/Light Themes/Tools/Zoom_l.png differ diff --git a/Assets/Graphics/Light Themes/Tools/Zoom_l.png.import b/Assets/Graphics/Light Themes/Tools/Zoom_l.png.import new file mode 100644 index 000000000..821252661 --- /dev/null +++ b/Assets/Graphics/Light Themes/Tools/Zoom_l.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Zoom_l.png-0888c26a8d0dc63865bf929d4d81b466.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Light Themes/Tools/Zoom_l.png" +dest_files=[ "res://.import/Zoom_l.png-0888c26a8d0dc63865bf929d4d81b466.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Assets/Graphics/Light Themes/Tools/Zoom_l_r.png b/Assets/Graphics/Light Themes/Tools/Zoom_l_r.png new file mode 100644 index 000000000..48ae85dc7 Binary files /dev/null and b/Assets/Graphics/Light Themes/Tools/Zoom_l_r.png differ diff --git a/Assets/Graphics/Light Themes/Tools/Zoom_l_r.png.import b/Assets/Graphics/Light Themes/Tools/Zoom_l_r.png.import new file mode 100644 index 000000000..9ef7f20e0 --- /dev/null +++ b/Assets/Graphics/Light Themes/Tools/Zoom_l_r.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Zoom_l_r.png-b2e15ef8ba24a0281d47c6e1fda4c79b.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Light Themes/Tools/Zoom_l_r.png" +dest_files=[ "res://.import/Zoom_l_r.png-b2e15ef8ba24a0281d47c6e1fda4c79b.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Assets/Graphics/Light Themes/Tools/Zoom_r.png b/Assets/Graphics/Light Themes/Tools/Zoom_r.png new file mode 100644 index 000000000..025744122 Binary files /dev/null and b/Assets/Graphics/Light Themes/Tools/Zoom_r.png differ diff --git a/Assets/Graphics/Light Themes/Tools/Zoom_r.png.import b/Assets/Graphics/Light Themes/Tools/Zoom_r.png.import new file mode 100644 index 000000000..e3c6b0b58 --- /dev/null +++ b/Assets/Graphics/Light Themes/Tools/Zoom_r.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Zoom_r.png-5a61f1daada72161eb5c98d11e189b7e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Light Themes/Tools/Zoom_r.png" +dest_files=[ "res://.import/Zoom_r.png-5a61f1daada72161eb5c98d11e189b7e.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Assets/Graphics/Tool Cursors/Zoom_Cursor.png b/Assets/Graphics/Tool Cursors/Zoom_Cursor.png new file mode 100644 index 000000000..9849434c6 Binary files /dev/null and b/Assets/Graphics/Tool Cursors/Zoom_Cursor.png differ diff --git a/Assets/Graphics/Tool Cursors/Zoom_Cursor.png.import b/Assets/Graphics/Tool Cursors/Zoom_Cursor.png.import new file mode 100644 index 000000000..4f852b99b --- /dev/null +++ b/Assets/Graphics/Tool Cursors/Zoom_Cursor.png.import @@ -0,0 +1,13 @@ +[remap] + +importer="image" +type="Image" +path="res://.import/Zoom_Cursor.png-e3af3f47b82b1194656f9f30a59605fd.image" + +[deps] + +source_file="res://Assets/Graphics/Tool Cursors/Zoom_Cursor.png" +dest_files=[ "res://.import/Zoom_Cursor.png-e3af3f47b82b1194656f9f30a59605fd.image" ] + +[params] + diff --git a/Changelog.md b/Changelog.md index 959242643..f6362eae4 100644 --- a/Changelog.md +++ b/Changelog.md @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [v0.7] - Unreleased This update has been brought to you by the contributions of: -Martin Novák (novhack), luiq54, Schweini07, Marco Galli (Gaarco), Teashrock +Martin Novák (novhack), luiq54, Schweini07, Marco Galli (Gaarco), Matheus Pesegoginski (MatheusPese), sapient-cogbag ### Added - Cels are now in the timeline. Each cel refers to a specific layer AND a frame. Frames are a collection of cels for every layer. @@ -22,7 +22,7 @@ Martin Novák (novhack), luiq54, Schweini07, Marco Galli (Gaarco), Teashrock - Ability to get color for palette buttons, when editing a palette, from the currently selected left and right colors. - Esperanto translation. - When the image is unsaved and the user tries to make a new one, a new warning dialog will appear to ask for confirmation. -- You can now zoom in with the `+` key, and zoom out with `-`. +- A new zoom tool has been added, and you can also zoom in with the `+` key, and zoom out with `-`. - The left and right tool icon options (found in Preferences) are now saved and restored on startup. ### Changed @@ -40,6 +40,7 @@ Martin Novák (novhack), luiq54, Schweini07, Marco Galli (Gaarco), Teashrock - Onion skinning settings have been moved to a popup window, and 2 new buttons were added. One that toggles onion skinning, and one that opens the settings window. - The default window size is now 1280x720, and the minimum window size is 1024x576. - .pxo files now use ZSTD compression to result in smaller file sizes. +- Palettes/Brushes get loaded/saved in appropriate locations as specified by the XDG basedir standard, for easier usage of standard linux/bsd packaging methods and for better per-user usability. - The splash screen is no longer purple, it now gets affected by the chosen theme. ### Fixed @@ -48,6 +49,9 @@ Martin Novák (novhack), luiq54, Schweini07, Marco Galli (Gaarco), Teashrock - Fixed issue with LineEdits not letting go of focus when the user clicked somewhere else.! (Issue #167) - When the palette, outline and rotate image dialogs are open, the user can't zoom in the canvas anymore. +### Removed +- It's no longer possible for frames to have different amounts of layers. All frames have the same amount. + ## [v0.6.2] - 17-02-2020 ### Added diff --git a/Main.tscn b/Main.tscn index 3acbb519a..b4bb99e40 100644 --- a/Main.tscn +++ b/Main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=53 format=2] +[gd_scene load_steps=54 format=2] [ext_resource path="res://Themes & Styles/Dark Theme/Dark Theme.tres" type="Theme" id=1] [ext_resource path="res://Scripts/Main.gd" type="Script" id=2] @@ -42,6 +42,7 @@ [ext_resource path="res://Assets/Graphics/Dark Themes/Tools/Horizontal_Mirror_On.png" type="Texture" id=40] [ext_resource path="res://Assets/Graphics/Dark Themes/Tools/Vertical_Mirror_On.png" type="Texture" id=41] [ext_resource path="res://Assets/Graphics/Dark Themes/Tools/Vertical_Mirror_Off.png" type="Texture" id=42] +[ext_resource path="res://Assets/Graphics/Dark Themes/Tools/Zoom.png" type="Texture" id=43] [sub_resource type="InputEventKey" id=1] scancode = 88 @@ -232,7 +233,7 @@ mouse_default_cursor_shape = 2 button_mask = 3 texture_normal = ExtResource( 4 ) -[node name="ColorPicker" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[ +[node name="Zoom" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[ "UIButtons", ]] margin_top = 36.0 @@ -240,9 +241,9 @@ margin_right = 32.0 margin_bottom = 68.0 mouse_default_cursor_shape = 2 button_mask = 3 -texture_normal = ExtResource( 5 ) +texture_normal = ExtResource( 43 ) -[node name="Pencil" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[ +[node name="ColorPicker" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[ "UIButtons", ]] margin_top = 72.0 @@ -250,9 +251,9 @@ margin_right = 32.0 margin_bottom = 104.0 mouse_default_cursor_shape = 2 button_mask = 3 -texture_normal = ExtResource( 6 ) +texture_normal = ExtResource( 5 ) -[node name="Eraser" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[ +[node name="Pencil" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[ "UIButtons", ]] margin_top = 108.0 @@ -260,9 +261,9 @@ margin_right = 32.0 margin_bottom = 140.0 mouse_default_cursor_shape = 2 button_mask = 3 -texture_normal = ExtResource( 7 ) +texture_normal = ExtResource( 6 ) -[node name="Bucket" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[ +[node name="Eraser" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[ "UIButtons", ]] margin_top = 144.0 @@ -270,9 +271,9 @@ margin_right = 32.0 margin_bottom = 176.0 mouse_default_cursor_shape = 2 button_mask = 3 -texture_normal = ExtResource( 8 ) +texture_normal = ExtResource( 7 ) -[node name="LightenDarken" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[ +[node name="Bucket" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[ "UIButtons", ]] margin_top = 180.0 @@ -280,6 +281,16 @@ margin_right = 32.0 margin_bottom = 212.0 mouse_default_cursor_shape = 2 button_mask = 3 +texture_normal = ExtResource( 8 ) + +[node name="LightenDarken" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[ +"UIButtons", +]] +margin_top = 216.0 +margin_right = 32.0 +margin_bottom = 248.0 +mouse_default_cursor_shape = 2 +button_mask = 3 texture_normal = ExtResource( 9 ) [node name="CanvasAndTimeline" type="VSplitContainer" parent="MenuAndUI/UI"] @@ -704,9 +715,9 @@ ticks_on_borders = true [node name="LeftColorPickerOptions" type="VBoxContainer" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions"] visible = false -margin_top = 142.0 +margin_top = 75.0 margin_right = 138.0 -margin_bottom = 184.0 +margin_bottom = 117.0 [node name="Label" type="Label" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions/LeftColorPickerOptions"] margin_left = 47.0 @@ -727,6 +738,59 @@ text = "Left Color" items = [ "Left Color", null, false, 0, null, "Right Color", null, false, 1, null ] selected = 0 +[node name="LeftZoomOptions" type="VBoxContainer" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions"] +visible = false +margin_top = 75.0 +margin_right = 138.0 +margin_bottom = 190.0 + +[node name="ModeLabel" type="Label" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions/LeftZoomOptions"] +margin_left = 52.0 +margin_right = 85.0 +margin_bottom = 15.0 +mouse_default_cursor_shape = 2 +size_flags_horizontal = 4 +text = "Mode:" + +[node name="LeftZoomModeOptions" type="OptionButton" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions/LeftZoomOptions"] +margin_left = 22.0 +margin_top = 19.0 +margin_right = 114.0 +margin_bottom = 42.0 +rect_min_size = Vector2( 92, 0 ) +mouse_default_cursor_shape = 2 +size_flags_horizontal = 4 +text = "Zoom in" +items = [ "Zoom in", null, false, 0, null, "Zoom out", null, false, 1, null ] +selected = 0 + +[node name="OptionsLabel" type="Label" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions/LeftZoomOptions"] +margin_left = 46.0 +margin_top = 46.0 +margin_right = 91.0 +margin_bottom = 61.0 +mouse_default_cursor_shape = 2 +size_flags_horizontal = 4 +text = "Options:" + +[node name="FitToFrameButton" type="Button" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions/LeftZoomOptions"] +margin_left = 22.0 +margin_top = 65.0 +margin_right = 114.0 +margin_bottom = 88.0 +rect_min_size = Vector2( 92, 0 ) +size_flags_horizontal = 4 +text = "Fit to frame" + +[node name="100%ZoomButton" type="Button" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions/LeftZoomOptions"] +margin_left = 22.0 +margin_top = 92.0 +margin_right = 114.0 +margin_bottom = 115.0 +rect_min_size = Vector2( 92, 0 ) +size_flags_horizontal = 4 +text = "100% Zoom" + [node name="EmptySpacer" type="Control" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions"] margin_top = 75.0 margin_right = 144.0 @@ -969,6 +1033,59 @@ text = "Right Color" items = [ "Left Color", null, false, 0, null, "Right Color", null, false, 1, null ] selected = 1 +[node name="RightZoomOptions" type="VBoxContainer" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions"] +visible = false +margin_top = 75.0 +margin_right = 138.0 +margin_bottom = 190.0 + +[node name="ModeLabel" type="Label" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions/RightZoomOptions"] +margin_left = 52.0 +margin_right = 85.0 +margin_bottom = 15.0 +mouse_default_cursor_shape = 2 +size_flags_horizontal = 4 +text = "Mode:" + +[node name="RightZoomModeOptions" type="OptionButton" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions/RightZoomOptions"] +margin_left = 22.0 +margin_top = 19.0 +margin_right = 114.0 +margin_bottom = 42.0 +rect_min_size = Vector2( 92, 0 ) +mouse_default_cursor_shape = 2 +size_flags_horizontal = 4 +text = "Zoom in" +items = [ "Zoom in", null, false, 0, null, "Zoom out", null, false, 1, null ] +selected = 0 + +[node name="OptionsLabel" type="Label" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions/RightZoomOptions"] +margin_left = 46.0 +margin_top = 46.0 +margin_right = 91.0 +margin_bottom = 61.0 +mouse_default_cursor_shape = 2 +size_flags_horizontal = 4 +text = "Options:" + +[node name="FitToFrameButton" type="Button" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions/RightZoomOptions"] +margin_left = 22.0 +margin_top = 65.0 +margin_right = 114.0 +margin_bottom = 88.0 +rect_min_size = Vector2( 92, 0 ) +size_flags_horizontal = 4 +text = "Fit to frame" + +[node name="100%ZoomButton" type="Button" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions/RightZoomOptions"] +margin_left = 22.0 +margin_top = 92.0 +margin_right = 114.0 +margin_bottom = 115.0 +rect_min_size = Vector2( 92, 0 ) +size_flags_horizontal = 4 +text = "100% Zoom" + [node name="EmptySpacer" type="Control" parent="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions"] margin_top = 75.0 margin_right = 144.0 @@ -1174,8 +1291,8 @@ resizable = true mode = 0 access = 2 filters = PoolStringArray( "*.pxo ; Pixelorama Project" ) -current_dir = "" -current_path = "" +current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama" +current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/" [node name="SaveSprite" type="FileDialog" parent="."] anchor_left = 0.5 @@ -1190,12 +1307,10 @@ window_title = "Save Sprite as .pxo" resizable = true access = 2 filters = PoolStringArray( "*.pxo ; Pixelorama Project" ) -current_dir = "" -current_path = "" +current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama" +current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/" [node name="ImportSprites" parent="." instance=ExtResource( 29 )] -current_dir = "" -current_path = "" [node name="ExportDialog" parent="." instance=ExtResource( 39 )] @@ -1244,8 +1359,8 @@ dialog_text = "This is an error message!" [node name="PaletteImportFileDialog" parent="." instance=ExtResource( 37 )] filters = PoolStringArray( "*.json ; JavaScript Object Notation", "*.gpl ; Gimp Palette Library", "*.png; Portable Network Graphics" ) -current_dir = "" -current_path = "" +current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama" +current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/" [node name="LeftCursor" type="Sprite" parent="."] visible = false @@ -1276,6 +1391,9 @@ visible = false [connection signal="value_changed" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions/LeftLDOptions/LeftLDAmountSpinbox" to="." method="_on_LeftLDAmountSpinbox_value_changed"] [connection signal="value_changed" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions/LeftLDOptions/LeftLDAmountSlider" to="." method="_on_LeftLDAmountSpinbox_value_changed"] [connection signal="item_selected" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions/LeftColorPickerOptions/LeftForColorOptions" to="." method="_on_LeftForColorOptions_item_selected"] +[connection signal="item_selected" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions/LeftZoomOptions/LeftZoomModeOptions" to="." method="_on_LeftZoomModeOptions_item_selected"] +[connection signal="pressed" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions/LeftZoomOptions/FitToFrameButton" to="." method="_on_FitToFrameButton_pressed"] +[connection signal="pressed" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions/LeftZoomOptions/100%ZoomButton" to="." method="_on_100ZoomButton_pressed"] [connection signal="toggled" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions/LeftMirrorButtons/LeftHorizontalMirroring" to="." method="_on_LeftHorizontalMirroring_toggled"] [connection signal="toggled" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/LeftToolOptions/LeftMirrorButtons/LeftVerticalMirroring" to="." method="_on_LeftVerticalMirroring_toggled"] [connection signal="pressed" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions/RightBrushType/RightBrushTypeButton" to="." method="_on_RightBrushTypeButton_pressed"] @@ -1288,6 +1406,9 @@ visible = false [connection signal="value_changed" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions/RightLDOptions/RightLDAmountSpinbox" to="." method="_on_RightLDAmountSpinbox_value_changed"] [connection signal="value_changed" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions/RightLDOptions/RightLDAmountSlider" to="." method="_on_RightLDAmountSpinbox_value_changed"] [connection signal="item_selected" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions/RightColorPickerOptions/RightForColorOptions" to="." method="_on_RightForColorOptions_item_selected"] +[connection signal="item_selected" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions/RightZoomOptions/RightZoomModeOptions" to="." method="_on_RightZoomModeOptions_item_selected"] +[connection signal="pressed" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions/RightZoomOptions/FitToFrameButton" to="." method="_on_FitToFrameButton_pressed"] +[connection signal="pressed" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions/RightZoomOptions/100%ZoomButton" to="." method="_on_100ZoomButton_pressed"] [connection signal="toggled" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions/RightMirrorButtons/RightHorizontalMirroring" to="." method="_on_RightHorizontalMirroring_toggled"] [connection signal="toggled" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer/ToolOptions/RightToolOptions/RightMirrorButtons/RightVerticalMirroring" to="." method="_on_RightVerticalMirroring_toggled"] [connection signal="pressed" from="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/CenterContainer/PaletteButtons/AddPalette" to="MenuAndUI/UI/RightPanel/PreviewAndPalettes/ToolAndPaletteVSplit/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_AddPalette_pressed"] diff --git a/Prefabs/Dialogs/PreferencesDialog.tscn b/Prefabs/Dialogs/PreferencesDialog.tscn index 30c7d781f..80cd049a2 100644 --- a/Prefabs/Dialogs/PreferencesDialog.tscn +++ b/Prefabs/Dialogs/PreferencesDialog.tscn @@ -46,7 +46,7 @@ size_flags_horizontal = 3 [node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/ScrollContainer"] margin_right = 314.0 -margin_bottom = 1162.0 +margin_bottom = 1186.0 size_flags_horizontal = 3 [node name="General" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"] @@ -438,7 +438,7 @@ color = Color( 0, 0, 0, 0 ) [node name="Shortcuts" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"] margin_top = 964.0 margin_right = 314.0 -margin_bottom = 1162.0 +margin_bottom = 1186.0 [node name="HBoxContainer" type="HBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts"] margin_right = 314.0 @@ -467,7 +467,7 @@ margin_bottom = 28.0 [node name="Shortcuts" type="GridContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts"] margin_top = 32.0 margin_right = 314.0 -margin_bottom = 198.0 +margin_bottom = 222.0 custom_constants/hseparation = 5 columns = 3 @@ -526,95 +526,115 @@ margin_right = 313.0 margin_bottom = 46.0 size_flags_horizontal = 3 -[node name="ColorPickerLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] +[node name="ZoomLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] margin_top = 53.0 margin_right = 137.0 margin_bottom = 67.0 +text = "Zoom" + +[node name="left_zoom_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] +margin_left = 142.0 +margin_top = 50.0 +margin_right = 225.0 +margin_bottom = 70.0 +size_flags_horizontal = 3 + +[node name="right_zoom_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] +margin_left = 230.0 +margin_top = 50.0 +margin_right = 313.0 +margin_bottom = 70.0 +size_flags_horizontal = 3 + +[node name="ColorPickerLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] +margin_top = 77.0 +margin_right = 137.0 +margin_bottom = 91.0 text = "Color Picker" [node name="left_colorpicker_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] margin_left = 142.0 -margin_top = 50.0 +margin_top = 74.0 margin_right = 225.0 -margin_bottom = 70.0 +margin_bottom = 94.0 [node name="right_colorpicker_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] margin_left = 230.0 -margin_top = 50.0 +margin_top = 74.0 margin_right = 313.0 -margin_bottom = 70.0 +margin_bottom = 94.0 [node name="PencilLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] -margin_top = 77.0 +margin_top = 101.0 margin_right = 137.0 -margin_bottom = 91.0 +margin_bottom = 115.0 text = "Pencil" [node name="left_pencil_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] margin_left = 142.0 -margin_top = 74.0 +margin_top = 98.0 margin_right = 225.0 -margin_bottom = 94.0 +margin_bottom = 118.0 [node name="right_pencil_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] margin_left = 230.0 -margin_top = 74.0 +margin_top = 98.0 margin_right = 313.0 -margin_bottom = 94.0 +margin_bottom = 118.0 [node name="EraserLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] -margin_top = 101.0 +margin_top = 125.0 margin_right = 137.0 -margin_bottom = 115.0 +margin_bottom = 139.0 text = "Eraser" [node name="left_eraser_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] margin_left = 142.0 -margin_top = 98.0 +margin_top = 122.0 margin_right = 225.0 -margin_bottom = 118.0 +margin_bottom = 142.0 [node name="right_eraser_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] margin_left = 230.0 -margin_top = 98.0 +margin_top = 122.0 margin_right = 313.0 -margin_bottom = 118.0 +margin_bottom = 142.0 [node name="BucketLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] -margin_top = 125.0 +margin_top = 149.0 margin_right = 137.0 -margin_bottom = 139.0 +margin_bottom = 163.0 text = "Bucket" [node name="left_fill_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] margin_left = 142.0 -margin_top = 122.0 +margin_top = 146.0 margin_right = 225.0 -margin_bottom = 142.0 +margin_bottom = 166.0 [node name="right_fill_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] margin_left = 230.0 -margin_top = 122.0 +margin_top = 146.0 margin_right = 313.0 -margin_bottom = 142.0 +margin_bottom = 166.0 [node name="LightenDarkenLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] -margin_top = 149.0 +margin_top = 173.0 margin_right = 137.0 -margin_bottom = 163.0 +margin_bottom = 187.0 text = "Lighten/Darken" [node name="left_lightdark_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] margin_left = 142.0 -margin_top = 146.0 +margin_top = 170.0 margin_right = 225.0 -margin_bottom = 166.0 +margin_bottom = 190.0 [node name="right_lightdark_tool" type="Button" parent="HSplitContainer/ScrollContainer/VBoxContainer/Shortcuts/Shortcuts"] margin_left = 230.0 -margin_top = 146.0 +margin_top = 170.0 margin_right = 313.0 -margin_bottom = 166.0 +margin_bottom = 190.0 [node name="Popups" type="Node" parent="."] diff --git a/Scripts/Canvas.gd b/Scripts/Canvas.gd index afafc78af..07441bcf1 100644 --- a/Scripts/Canvas.gd +++ b/Scripts/Canvas.gd @@ -251,6 +251,7 @@ func _input(event : InputEvent) -> void: var ld := 0 var ld_amount := 0.1 var color_picker_for := 0 + var zoom_mode := 0 west_limit = location.x east_limit = location.x + size.x @@ -270,6 +271,8 @@ func _input(event : InputEvent) -> void: ld = Global.left_ld ld_amount = Global.left_ld_amount color_picker_for = Global.left_color_picker_for + zoom_mode = Global.left_zoom_mode + elif Input.is_mouse_button_pressed(BUTTON_RIGHT): current_mouse_button = "right_mouse" current_action = Global.current_right_tool @@ -278,6 +281,7 @@ func _input(event : InputEvent) -> void: ld = Global.right_ld ld_amount = Global.right_ld_amount color_picker_for = Global.right_color_picker_for + zoom_mode = Global.right_zoom_mode if mouse_in_canvas && Global.has_focus: Global.cursor_position_label.text = "[%s×%s] %s, %s" % [size.x, size.y, mouse_pos_floored.x, mouse_pos_floored.y] @@ -441,6 +445,12 @@ func _input(event : InputEvent) -> void: elif color_picker_for == 1: # Pick for the left color Global.right_color_picker.color = pixel_color Global.update_right_custom_brush() + "Zoom": + if can_handle: + if zoom_mode == 0: + Global.camera.zoom_camera(-1) + else: + Global.camera.zoom_camera(1) if Global.can_draw && Global.has_focus && Input.is_action_just_pressed("shift") && (["Pencil", "Eraser", "LightenDarken"].has(Global.current_left_tool) || ["Pencil", "Eraser", "LightenDarken"].has(Global.current_right_tool)): is_making_line = true diff --git a/Scripts/Global.gd b/Scripts/Global.gd index d26493e5a..52516a8c2 100644 --- a/Scripts/Global.gd +++ b/Scripts/Global.gd @@ -95,6 +95,10 @@ var left_color_picker_for := 0 # warning-ignore:unused_class_variable var right_color_picker_for := 1 +# 0 for zoom in, 1 for zoom out +var left_zoom_mode := 0 +var right_zoom_mode := 0 + # warning-ignore:unused_class_variable var left_horizontal_mirror := false # warning-ignore:unused_class_variable @@ -224,6 +228,9 @@ var right_ld_amount_spinbox : SpinBox var left_colorpicker_container : Container var right_colorpicker_container : Container +var left_zoom_container : Container +var right_zoom_container : Container + var left_mirror_container : Container var right_mirror_container : Container @@ -346,6 +353,9 @@ func _ready() -> void: left_colorpicker_container = find_node_by_name(root, "LeftColorPickerOptions") right_colorpicker_container = find_node_by_name(root, "RightColorPickerOptions") + left_zoom_container = find_node_by_name(root, "LeftZoomOptions") + right_zoom_container = find_node_by_name(root, "RightZoomOptions") + left_mirror_container = find_node_by_name(root, "LeftMirrorButtons") right_mirror_container = find_node_by_name(root, "RightMirrorButtons") @@ -674,6 +684,13 @@ func update_hint_tooltips() -> void: Press %s to move the content""") % [InputMap.get_action_list("left_rectangle_select_tool")[0].as_text(), InputMap.get_action_list("right_rectangle_select_tool")[0].as_text(), "Shift"] + var zoom_tool : BaseButton = find_node_by_name(root, "Zoom") + zoom_tool.hint_tooltip = tr("""Zoom + +%s for left mouse button +%s for right mouse button""") % [InputMap.get_action_list("left_zoom_tool")[0].as_text(), InputMap.get_action_list("right_zoom_tool")[0].as_text()] + + var color_picker : BaseButton = find_node_by_name(root, "ColorPicker") color_picker.hint_tooltip = tr("""Color Picker Select a color from a pixel of the sprite diff --git a/Scripts/Main.gd b/Scripts/Main.gd index 2d03940fa..cd5e0609b 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -144,6 +144,7 @@ func _ready() -> void: tools.append([Global.find_node_by_name(root, "LightenDarken"), "left_lightdark_tool", "right_lightdark_tool"]) tools.append([Global.find_node_by_name(root, "RectSelect"), "left_rectangle_select_tool", "right_rectangle_select_tool"]) tools.append([Global.find_node_by_name(root, "ColorPicker"), "left_colorpicker_tool", "right_colorpicker_tool"]) + tools.append([Global.find_node_by_name(root, "Zoom"), "left_zoom_tool", "right_zoom_tool"]) for t in tools: t[0].connect("pressed", self, "_on_Tool_pressed", [t[0]]) @@ -477,6 +478,8 @@ func _on_Tool_pressed(tool_pressed : BaseButton, mouse_press := true, key_for_le Global.left_mirror_container.visible = true elif current_action == "ColorPicker": Global.left_colorpicker_container.visible = true + elif current_action == "Zoom": + Global.left_zoom_container.visible = true elif (mouse_press and Input.is_action_just_released("right_mouse")) or (!mouse_press and !key_for_left): Global.current_right_tool = current_action @@ -511,6 +514,8 @@ func _on_Tool_pressed(tool_pressed : BaseButton, mouse_press := true, key_for_le Global.right_mirror_container.visible = true elif current_action == "ColorPicker": Global.right_colorpicker_container.visible = true + elif current_action == "Zoom": + Global.right_zoom_container.visible = true for t in tools: var tool_name : String = t[0].name @@ -557,13 +562,14 @@ func _on_ColorSwitch_pressed() -> void: update_left_custom_brush() update_right_custom_brush() + func _on_ColorDefaults_pressed() -> void: Global.left_color_picker.color = Color.black Global.right_color_picker.color = Color.white update_left_custom_brush() update_right_custom_brush() -# warning-ignore:unused_argument + func _on_LeftColorPickerButton_color_changed(color : Color) -> void: # If the color changed while it's on full transparency, make it opaque (GH issue #54) if color.a == 0: @@ -572,7 +578,7 @@ func _on_LeftColorPickerButton_color_changed(color : Color) -> void: update_left_custom_brush() previous_left_color = color -# warning-ignore:unused_argument + func _on_RightColorPickerButton_color_changed(color : Color) -> void: # If the color changed while it's on full transparency, make it opaque (GH issue #54) if color.a == 0: @@ -581,67 +587,110 @@ func _on_RightColorPickerButton_color_changed(color : Color) -> void: update_right_custom_brush() previous_right_color = color -# warning-ignore:unused_argument + func _on_LeftInterpolateFactor_value_changed(value : float) -> void: Global.left_interpolate_spinbox.value = value Global.left_interpolate_slider.value = value update_left_custom_brush() -# warning-ignore:unused_argument + func _on_RightInterpolateFactor_value_changed(value : float) -> void: Global.right_interpolate_spinbox.value = value Global.right_interpolate_slider.value = value update_right_custom_brush() + func update_left_custom_brush() -> void: Global.update_left_custom_brush() + + func update_right_custom_brush() -> void: Global.update_right_custom_brush() + func _on_LeftFillAreaOptions_item_selected(ID : int) -> void: Global.left_fill_area = ID + func _on_RightFillAreaOptions_item_selected(ID : int) -> void: Global.right_fill_area = ID + func _on_LeftLightenDarken_item_selected(ID : int) -> void: Global.left_ld = ID + + func _on_LeftLDAmountSpinbox_value_changed(value : float) -> void: Global.left_ld_amount = value / 100 Global.left_ld_amount_slider.value = value Global.left_ld_amount_spinbox.value = value + func _on_RightLightenDarken_item_selected(ID : int) -> void: Global.right_ld = ID + + func _on_RightLDAmountSpinbox_value_changed(value : float) -> void: Global.right_ld_amount = value / 100 Global.right_ld_amount_slider.value = value Global.right_ld_amount_spinbox.value = value + func _on_LeftForColorOptions_item_selected(ID : int) -> void: Global.left_color_picker_for = ID + func _on_RightForColorOptions_item_selected(ID : int) -> void: Global.right_color_picker_for = ID + +func _on_LeftZoomModeOptions_item_selected(ID : int) -> void: + Global.left_zoom_mode = ID + + +func _on_RightZoomModeOptions_item_selected(ID : int) -> void: + Global.right_zoom_mode = ID + + +func _on_FitToFrameButton_pressed() -> void: + var bigger = max(Global.canvas.size.x, Global.canvas.size.y) + Global.camera.zoom = Vector2(bigger, bigger) * 0.002 + Global.camera.offset = Global.canvas.size / 2 + Global.zoom_level_label.text = str(round(100 / Global.camera.zoom.x)) + " %" + + +func _on_100ZoomButton_pressed() -> void: + Global.camera.zoom = Vector2.ONE + Global.camera.offset = Global.canvas.size / 2 + Global.zoom_level_label.text = str(round(100 / Global.camera.zoom.x)) + " %" + + func _on_LeftHorizontalMirroring_toggled(button_pressed) -> void: Global.left_horizontal_mirror = button_pressed + + func _on_LeftVerticalMirroring_toggled(button_pressed) -> void: Global.left_vertical_mirror = button_pressed + func _on_RightHorizontalMirroring_toggled(button_pressed) -> void: Global.right_horizontal_mirror = button_pressed + + func _on_RightVerticalMirroring_toggled(button_pressed) -> void: Global.right_vertical_mirror = button_pressed + func show_quit_dialog() -> void: if !$QuitDialog.visible: if Global.saved: $QuitDialog.call_deferred("popup_centered") else: $QuitAndSaveDialog.call_deferred("popup_centered") + Global.can_draw = false + func _on_QuitAndSaveDialog_custom_action(action : String) -> void: if action == "Save": is_quitting_on_save = true @@ -649,10 +698,10 @@ func _on_QuitAndSaveDialog_custom_action(action : String) -> void: $QuitDialog.hide() Global.can_draw = false + func _on_QuitDialog_confirmed() -> void: # Darken the UI to denote that the application is currently exiting # (it won't respond to user input in this state). modulate = Color(0.5, 0.5, 0.5) get_tree().quit() - diff --git a/Translations/Translations.pot b/Translations/Translations.pot index 2c21a58ba..9b3d2019c 100644 --- a/Translations/Translations.pot +++ b/Translations/Translations.pot @@ -449,6 +449,11 @@ msgid "Rectangular Selection\n\n" "Press %s to move the content" msgstr "" +msgid "Zoom\n\n" +"%s for left mouse button\n" +"%s for right mouse button" +msgstr "" + msgid "Color Picker\n" "Select a color from a pixel of the sprite\n\n" "%s for left mouse button\n" @@ -493,9 +498,6 @@ msgstr "" msgid "Reset the colors to their default state (black for left, white for right)" msgstr "" -msgid "Raw Mode" -msgstr "" - msgid "Left tool options" msgstr "" @@ -580,6 +582,24 @@ msgstr "" msgid "Right Color" msgstr "" +msgid "Mode:" +msgstr "" + +msgid "Zoom in" +msgstr "" + +msgid "Zoom out" +msgstr "" + +msgid "Options:" +msgstr "" + +msgid "Fit to frame" +msgstr "" + +msgid "100% Zoom" +msgstr "" + msgid "Mirroring" msgstr "" @@ -891,6 +911,9 @@ msgstr "" msgid "Rectangular Selection" msgstr "" +msgid "Zoom" +msgstr "" + msgid "Color Picker" msgstr "" diff --git a/project.godot b/project.godot index dde3b05ff..1636991c6 100644 --- a/project.godot +++ b/project.godot @@ -310,6 +310,16 @@ image_flip_vertical={ "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":false,"command":false,"pressed":false,"scancode":86,"unicode":0,"echo":false,"script":null) ] } +left_zoom_tool={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":90,"unicode":0,"echo":false,"script":null) + ] +} +right_zoom_tool={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":true,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":90,"unicode":0,"echo":false,"script":null) + ] +} [locale]