1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 09:39:48 +00:00
Commit graph

1149 commits

Author SHA1 Message Date
Emmanouil Papadeas 92e0e7e11c Clear some code in HandleLanguages.gd
Got rid of the second for loop, so maybe this is a minor speedup as well.
2022-09-22 23:22:40 +03:00
Emmanouil Papadeas 64746d9f31 Create a _popup_dialog() method in TopMenuContainer.gd to reduce lines of code 2022-09-22 18:02:01 +03:00
Emmanouil Papadeas b095fae462 Don't let menu shortcuts work if there's a dialog open
Continuation of the fix for #709
2022-09-22 17:46:22 +03:00
Emmanouil Papadeas 3104e481f0 Fix #709 and allow for non-keyboard shortcut bindings for tools 2022-09-22 17:32:07 +03:00
Emmanouil Papadeas c2e90f77b0 Fix PreferencesDialog becoming smaller if the display scale changes 2022-09-22 17:04:20 +03:00
Emmanouil Papadeas 37eee319b5 Fix "Close" button in the Preferences not being translated from a non-English language
Before this commit, if Pixelorama started in a language other than English and then the user switched languages, the Close button's string would remain translated in the previous language
2022-09-22 16:40:53 +03:00
Emmanouil Papadeas 5a9a3ba495 Update AboutDialog.gd 2022-09-21 03:28:46 +03:00
Variable 56a113d36d
fix recent projects (#755) 2022-09-20 21:14:42 +03:00
Emmanouil Papadeas 950a6d77af Move pencil's brush slider above "Overwrite color" again 2022-09-20 20:46:53 +03:00
Variable 03813b41c5
Remember last choice in import options (#754)
* Remember last choice in import options

Implements 2nd point of  "Minor UX improvements #735"

* formatting
2022-09-20 20:28:35 +03:00
Emmanouil Papadeas 028a4c9f8a Remove minimum size from PreferencesDialog 2022-09-20 20:01:32 +03:00
Emmanouil Papadeas 8b78877f0c Make themes have consistent alignment and add header for the shortcuts in Preferences 2022-09-20 19:39:15 +03:00
Emmanouil Papadeas 1f55ac92fd Add tool button color & tool name header on each of the tool options 2022-09-20 00:58:39 +03:00
Emmanouil Papadeas 4fc44a71c6 Polish the preferences dialog and add a "Header" theme type variation for Labels 2022-09-20 00:16:01 +03:00
Emmanouil Papadeas af7f1f83b1 Disable "New Brush" instead of "Delete" in the Edit menu
Issue caused when "Paste in Place" was added.
2022-09-18 21:58:37 +03:00
Emmanouil Papadeas 63bc2332db Make bucket fill "Whole Selection" option work with patterns
Also fix issue with similar area and color fill where if the selected color is the same as the pixel's color in mouse position, the operation stops even if there are other cels selected.
2022-09-18 19:22:06 +03:00
Emmanouil Papadeas cac9b67335 Revert back to an OptionButton in the Bucket tool options and add "Whole Selection" option in the fill area
Still WIP, "Whole selection" isn't working with patterns yet.
2022-09-18 18:43:50 +03:00
Emmanouil Papadeas eda848ff63 Change "continuously" to "contiguously" 2022-09-18 17:23:42 +03:00
Emmanouil Papadeas 94789a57c8 Replace the fill area OptionButton with a Checkbox in the bucket tool options 2022-09-18 16:36:03 +03:00
Emmanouil Papadeas 698c7c4a08 Fix invalid image error when using the bucket tool to replace colors 2022-09-18 15:56:36 +03:00
Emmanouil Papadeas d69d98dc3b Auto-scale the UI based on dpi and resolution - Closes #643
Code is taken from Godot's editor, so I assume it should work well.
2022-09-18 01:17:35 +03:00
Emmanouil Papadeas c8efa7c09a Allow for down to 0.5 UI scale
Might be useful for small loDPI displays.
2022-09-17 03:03:17 +03:00
Emmanouil Papadeas 56748da971 Update GradientEdit hint tooltip string 2022-09-17 00:25:43 +03:00
Emmanouil Papadeas c2f2473d77 Add a "Divide into equal parts" button in GradientEdit
This is meant for easy gradient bisecting, which is helpful for converting Linear/Cubic interpolated gradients into Constant.
2022-09-17 00:19:08 +03:00
Emmanouil Papadeas a64f102b9a Change paste placement behavior
Paste now places the pasted content in the middle of the canvas view, instead of its original position. A new option in the Edit menu has been added, "Paste in Place", that preserves the previous behavior. This is similar to how GIMP works.
2022-09-15 00:08:22 +03:00
Emmanouil Papadeas 7558c2c891 Add an ExtensionsAPI version
This lets us keep track of changes in the Extensions API easier.
2022-09-14 01:16:39 +03:00
Emmanouil Papadeas 2e795e8db5 Fix onion skinning not working with mirror view
Addresses the 3rd issue in #717.
2022-09-13 00:49:22 +03:00
Variable 4b4b0773ff
Highlight color in palette if it's selected in color slots (#730)
* select pallete color (if present)

* find and select color

* [skip ci] Update CHANGELOG.md

Co-authored-by: Emmanouil Papadeas <manoschool@yahoo.gr>
Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2022-09-12 02:03:14 +03:00
Emmanouil Papadeas 66857f5e62 Make background around canvas configurable - implements #586 2022-09-10 02:58:13 +03:00
Emmanouil Papadeas d34e69579f Make circle brushes scale properly, with support for even-numebered diameters
Also reverts commit 488cf0cc93
2022-09-09 00:10:34 +03:00
Emmanouil Papadeas dee49b61bf Move get_ellipse_points() to DrawingAlgos
The same ellipse algorithm will be used for the circular brushes, as I can't seem to make the current circle algorithm work with even-numbered diameters.
2022-09-08 17:35:00 +03:00
Emmanouil Papadeas cd0c7ccdb0 Remove duplicate circle code from Draw.gd 2022-09-08 14:02:33 +03:00
Emmanouil Papadeas e7678ef5cc Move _fill_bitmap_with_points() to BaseTool.gd 2022-09-08 13:42:03 +03:00
Emmanouil Papadeas ffd6c8c88d Remove unused methods in Draw.gd 2022-09-08 13:32:03 +03:00
Emmanouil Papadeas edbbec1d55 Copy, cut & delete now affect the entire cel if there is no selection
Also fixed issue with delete deleting content from locked/invisible layers.
2022-09-08 01:10:23 +03:00
Emmanouil Papadeas c22633901d [skip ci] Fix typo 2022-09-05 18:17:20 +03:00
Manolis Papadeas d564139f98 Some more static typing
Apologies for the pointless-ish commits but I'm on vacation and time is limited :(
2022-09-03 00:58:29 +03:00
Manolis Papadeas 3bfbf07d58 Don't move selection if there's a dialog open 2022-09-01 00:21:18 +03:00
Manolis Papadeas eef722946c Change into forbidden cursor in the canvas if the layer is unavailable
Unavailable means either locked or invisible, or both.
2022-08-31 00:36:41 +03:00
Manolis Papadeas 488cf0cc93 Pixel perfect only affects the square brush 2022-08-30 20:11:01 +03:00
Manolis Papadeas 47ba050ad4 Some formatting changes 2022-08-29 22:15:43 +03:00
Manolis Papadeas 01f8273e4b Add some missing static typing 2022-08-29 21:11:43 +03:00
Emmanouil Papadeas 500fc5ac47 Change SplashDialog from WindowDialog to AcceptDialog
This eliminates the need of the dialog having a rect_min_size, which lets users resize it to make it even smaller. The OK button is being hidden at the start, so visually it should look almost the same.
2022-08-26 03:25:22 +03:00
Emmanouil Papadeas 7bfcabc466 Close project tabs with middle mouse click 2022-08-25 01:47:05 +03:00
Emmanouil Papadeas b9f0f0a647 Move left and right cursor sprite nodes to Main.gd 2022-08-24 14:22:40 +03:00
Emmanouil Papadeas 615491052a Minor code cleanup to reduce lines of code 2022-08-21 00:18:33 +03:00
Emmanouil Papadeas 27a23f5e37 Update contributors, translators and changelog URL 2022-08-18 02:04:08 +03:00
Emmanouil Papadeas e495f1f260 Add Danish language 2022-08-14 16:06:46 +03:00
Emmanouil Papadeas 92fcf8faca Update translations, rename "New tab" to "New project"
Addresses the first half of #735.
2022-08-11 01:44:45 +03:00
Emmanouil Papadeas 469f9bf4d3 Use theme type variations for RulerButtons and TopMenuContainer 2022-08-09 04:18:11 +03:00
Emmanouil Papadeas 8a8e6929b9 Replace Tweens with SceneTreeTweens
Futureproofing for easier porting to Godot 4.0, and reducing lines of code in the process ;)
2022-08-09 03:57:14 +03:00
Emmanouil Papadeas c66cac2fd8 Add an interpolation OptionButton to GradientEdit 2022-08-09 02:02:46 +03:00
Emmanouil Papadeas 8b70b56a5e Fix current frame button not being pressed when changing project 2022-08-08 21:37:00 +03:00
Emmanouil Papadeas c7ee96591c Some theme changes made automatically by Godot 3.5 2022-08-08 21:33:38 +03:00
Emmanouil Papadeas a9e624e319 Greatly optimize selection content deletion
New speeds with this commit (approximately)
64x64: 0-1ms
1024x1024: 27ms
2048x2048: 73ms
4096x4096: 261ms

Old speeds before this commit (approximately)
64x64: 42ms
1024x1024: 5204ms
2048x2048: 20988ms
4096x4096: 83973ms
2022-08-08 19:07:17 +03:00
Variable 8a6e393d69
New theme-related methods to ExtensionsAPI (#733)
* hide accidentally visible dialog

* added new theme methods

* Wait for themes to add from api

* remove `find_theme`

* revert last commit

* Formatting

* Some code changes

* update to godot 3.5
2022-08-08 16:20:42 +03:00
Emmanouil Papadeas afe5a90722 Use a HFlowContainer for the Tools
This commit requires Godot 3.5 and Pixelorama will no longer run in older Godot versions
2022-08-08 04:17:34 +03:00
Variable ef0adf55b1
Make changing window transparency only affect the main canvas' transparency (#734)
* Only change opacity of TabContainer of MainCanvas

* fix typo
2022-08-08 03:21:08 +03:00
Emmanouil Papadeas 41ccc704c2
Refactor the selection system to use an Image instead of a BitMap (#710)
* Use Image instead of BitMap for selection

Not complete and Pixelorama is currently broken

* Add a SelectionMap class

* Make the changes in Selection.gd

* Remove selection_bitmap

* Replace duplicate() with copy_from()

* Fix selection

Intersection and transforming are not working

* Fix wrong pixel color values

* Fix selection transforming

* Call selection_bitmap_changed() on scale

* Fix clipboard

* Remove bitmap_to_image()

* Rename selection_image to selection_map

* No errors in Magic Wand

* Rename selection_bitmap_changed() to selection_map_changed()

* Format

* Fix selection resizing

* Remove a line from image effects

* Fast selection inverting using shader

* Update SelectionMap.gd

* Format

* Convert SelectionMap back to LA8 after inverting

* Minor refactor in RectSelect.gd

* Fix intersections

* Use shader for ColorSelect and add color similarity option

* Update RotateImage.gd
2022-08-08 03:03:17 +03:00
Emmanouil Papadeas 7165f352b0 Make GradientEdit's color picker popup not get in the way of the preview 2022-08-04 17:14:43 +03:00
Variable 57387f3530
Change tilemask loading (#731)
* Load tilemask from current frame...

...instead of selecting from FileDialog

* Delete the FileDialog

* Added the reset button

every good loader needs a reset button, Cheers!!!
2022-08-03 00:42:54 +03:00
Variable 8803acd105
Tile mode fixes (Heavy testing required) (#723)
* Hide/Show options based on current tile option

* Changed a condition for tile mode

* Simplified tile detection code

* Priortize main tile as nearest if mouse is in it

* make tile mode draw behind canvas

* Changed a condition

* Tiles on top gets detected first...

...in case of overlap

* Only display relavant options

according to current mode

* Update preview according to..

..current mode

* removed print()

* Added tile masking

* Added tile masking

* Compare mask with project size

only masks with same size as project are accepted

* Formatting

* Added the suggestions

* Some minor modifications

* detect if a mask is loaded or not

* Added tile_mask to project

* Cosmetics

* added path detection

* added option to emit signal instead of loading...

... image directly through OpenSave

* Added a way to load mask for HTML5

* formatting

* formatting

* Formatting

* set proper way for saving tile_mask

* Formatting

* removed whitespace
2022-08-02 18:57:06 +03:00
Emmanouil Papadeas b7e6a183a6 Add dockable container methods to ExtensionsAPI 2022-07-31 16:06:26 +03:00
Emmanouil Papadeas 273f7f2569 Update AboutDialog.gd 2022-07-30 22:11:29 +03:00
Emmanouil Papadeas c5e2e1ce4c Change badly named variable in ExtensionsAPI 2022-07-29 20:51:45 +03:00
Emmanouil Papadeas acebbdf031 Update ExtensionsAPI.gd 2022-07-29 20:41:39 +03:00
Emmanouil Papadeas c9e5c97214 Fix wrong order of undoredo properties in open_image_as_spritesheet_layer 2022-07-29 19:23:32 +03:00
Emmanouil Papadeas dcebf894bf Fix crash when importing a spritesheet as a new layer, undoing and then exporting
Thanks to @Variable-ind for the fix.
2022-07-29 17:41:38 +03:00
Variable 937e895aef
Fix (slightly) wrong color being drawn when selected from palette (#729)
* fixed the bug for simle and pixel perfect

* fix wrong color drawn for bucket tool

* fixed an accidental change
2022-07-29 15:31:06 +03:00
Variable 9d71c7e6bc
removed initial angle quick rotation buttons (#728) 2022-07-29 12:38:25 +03:00
Emmanouil Papadeas 1350720a8f Fix Rotxel with Smear producing wrong alpha values for pixels outside the selection 2022-07-28 12:18:49 +03:00
Emmanouil Papadeas 559da5414b Implement @azagaya's rotation with smear shader 2022-07-28 01:04:24 +03:00
Emmanouil Papadeas 68ad07572a Some more minor changes in rotate image dialog and script 2022-07-25 17:47:01 +03:00
Emmanouil Papadeas 42942d2c0a Fix pivot drag not working in the Web version 2022-07-25 14:58:17 +03:00
Emmanouil Papadeas dfc8499d06 Changes in the Rotate image dialog and script 2022-07-25 14:39:23 +03:00
Variable 7381311e71
Pivot remembering and algorithm re-arrangement (#724)
* Make pivot remember it's last position

* formatting

* Re-arranged algorithms

According to their speed

* Accidentally left popup visible
2022-07-25 03:01:23 +03:00
Variable cca36b52e4
Upgrade current_cel to selected_cel for Preview Display (#722)
* 1 of 3

* 2 of 3

* 3 of 3
2022-07-24 02:20:58 +03:00
Variable 43a8a04704
Expose pivot Option (#720)
* Added the pivot system

* Some re-arrangement

* a bug-fix

* fixed a conversion scale bug

The problem was the conversion from rect to pixel scale was not properly done, i changed it so that it sets conversion factor of shorter side according to the longer side

* Fix to allow manual pivoting

* remove an update()

i may have added it my self but i think its not needed now

* made shader pivot consistent with gd script

by doing `pivot + Vector2(0.5, 0.5)` for "Nearest neighbour (Shader)"

* Cosmetics

* Formatting

* more formatting

* an optimization
2022-07-23 23:31:39 +03:00
Emmanouil Papadeas 388c121520 Make the canvas preview play button respect frame tags 2022-07-21 22:26:01 +03:00
Variable d7065ad6ae
Handle extension improvements (#715)
* Added crash protection

* removed an empty line

* Formatting

* more Formatting
2022-07-20 15:22:43 +03:00
Emmanouil Papadeas 69f25d398e Update Main.gd 2022-07-18 22:12:17 +03:00
Emmanouil Papadeas 0b1ea0d680 Made Guide.gd a bit easier to read 2022-07-15 21:13:46 +03:00
Emmanouil Papadeas 95cf6afb47 Added a get_global() method in ExtensionsAPI
In case an extension needs to use properties that can only be found in Global, such as a setting in the Preferences.
2022-07-14 18:22:19 +03:00
Emmanouil Papadeas 28d178c8d6 Change ifs to elifs in PreferencesDialog.gd's preference_update method 2022-07-10 02:55:18 +03:00
Emmanouil Papadeas a3c9dc8976 Load and save metadata from pxo files
Useful for certain extensions that want to save data in pxo files
2022-07-09 01:08:27 +03:00
Emmanouil Papadeas 29d590f2c2 Let users change left and right tool colors 2022-07-08 03:25:17 +03:00
Emmanouil Papadeas a705f848c9 Change the background left & right colors of tool buttons in code 2022-07-08 02:54:31 +03:00
Emmanouil Papadeas cb4c54617a Make the right tool indicator enabled by default and orange, closes #691 2022-07-08 02:49:40 +03:00
Emmanouil Papadeas 7bcae8e743 Remove duplicated lines from TopMenuContainer.gd
And add another idle_frame yield to _save_project_file_as()
2022-07-08 02:22:06 +03:00
Emmanouil Papadeas 5d65e82070 Fix issue with save file dialog taking the name of the first file it sees
Instead of using the project's name. This could've caused issues if the user accidentally replaced the previous file.
2022-07-07 17:39:16 +03:00
Emmanouil Papadeas a368ea500a Add more methods to ExtensionsAPI 2022-07-07 01:37:04 +03:00
Emmanouil Papadeas b5d268e7e1 Reload extension if the user is trying to add it and it already exists
Restarting Pixelorama to reload an extension should no longer be required
2022-07-06 00:12:38 +03:00
Emmanouil Papadeas 694c6c7509 [skip ci] Fix typos 2022-07-05 00:31:57 +03:00
Emmanouil Papadeas f432defd1f Fix symmetry points being wrong on project initialization
The symmetry points were wrong if the "Show Guides" option in the View menu is toggled off, and mirroring was enabled.
2022-07-04 21:36:19 +03:00
Emmanouil Papadeas 23f591a862 Support even-numbered rectangle and ellipse sizes in the shape tools
Needs testing.
2022-07-04 20:44:23 +03:00
Emmanouil Papadeas 55935bcfd2 Fix wrong color picker shortcut in shape tools and remove unneeded method 2022-07-04 03:09:43 +03:00
Variable feb68a21a5
Fixed move offsets (#713)
* Fixed move offsets

* Formatting

* More formatting

* Some more Formatting
2022-07-04 02:41:26 +03:00
Emmanouil Papadeas 8a922a255c Fix move tool grid offset snapping, follow-up to #712
Also re-formatted SelectionTool's draw_move()
2022-07-03 00:04:01 +03:00
Emmanouil Papadeas dcb963d733 [Experimental] Add a basic ExtensionsAPI autoload
This is still experimental, it is not recommended to start actually using it yet.
2022-07-02 19:24:44 +03:00
Variable 9805af36b0
offset corrections (#712)
* offset corrections

* formatting
2022-07-02 16:26:53 +03:00
Variable b95d884dcc
Onion icon change (#711)
* aspect changes for changed icon

* New "expandable" icon
2022-07-01 14:48:10 +03:00
Emmanouil Papadeas 90d2473f52 Fix macOS crash 2022-06-29 23:41:53 +03:00
Emmanouil Papadeas 30f9a3875d Import multiple images at once from File > Open 2022-06-27 14:51:26 +03:00
Emmanouil Papadeas 31b56500c2 Make Pixelorama work on Godot 3.5-rc4
For some reason it crashes without this fix, while it did not crash in RC3.
2022-06-26 01:39:25 +03:00
Variable c3eaddd9ca
Implemented text clipboard system instead of the old one (#693)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* added error calculation

* revert last commit

* Implemented OS.clipboard (using var2str())

* some sanity checks

* formatting

* use text system instead of os clibboard
2022-06-23 20:14:03 +03:00
Grant Moyer 8cfdcb5ebc
Add reset button to tile mode offsets dialog (#708)
I forgot to implement this requested feature in #707
2022-06-21 18:10:59 +03:00
Grant Moyer aadad462b9
Add options for custom tile mode offest (#707)
* Add preferences for tile mode basis vectors

Each tile is offset according to the x and y basis. For example, a tile (1,1) would be at basis_x + basis_y

* Update tools for custom tile modes

Show the indicator in the correct position, and only draw on the nearest tile.

* Fix style issues

* Move tile functionality to own class to prevent bloating Project

* Fix error in Tiles bounding box logic

* Make tile mode offsets project settings

Since the desired tile mode offsets depends on the tile being drawn, the tile mode offsets should be a project specific setting which is persisted in the project file.

* Update TileMode object immediately after closing dialog

* Don't draw center tile by default in TileMode

* Move tile mode offsets to view menu

* Move tile mode offsets dialog out of ImageEffects
2022-06-20 12:07:20 +03:00
Emmanouil Papadeas c508b554d0 On quit, make "Save & Exit" the focused button by default 2022-06-16 00:15:54 +03:00
Emmanouil Papadeas 7b067de20e Image effect refactors 2022-06-12 00:27:59 +03:00
Emmanouil Papadeas c9f0301c79 Add a Gradient Map image effect, implements the second half of #595
The gradient edit code was taken and modified from Material Maker, MIT license.
2022-06-11 16:16:37 +03:00
Matteo Piovanelli 872ac62722
Reworked draw_tool (#705)
* Refactored `draw_tool`

In draw.gd, efactored the `draw_tool(position)` function to memorize a
few preliminary steps that may be skipped on every pixel.

* Reformat

* Reformat

* Improved _set_pixel

Memorized a few results per-stroke rather than recomputing them on each
pixel.

* Refactor

* Improved draw_tool_circle

Memorized the shape of the circle as a vector of displacements from
the center to avoid recomputing the whole circle at every position.

* Refactor

* Reworked drat tool methods

I changed the implementations to use private functions that return the
array of points that would be affected by the tool. This way, when we
are drawing a stroke of a tool, we can get all points affected by the
stroke, filter out duplicates, and only set pixels once.

* refactor
2022-06-10 16:30:08 +03:00
Emmanouil Papadeas e4607a46bc Release v0.10.1-stable 2022-06-06 15:43:51 +03:00
Emmanouil Papadeas 0020029871 Update AboutDialog.gd 2022-06-05 17:51:59 +03:00
Emmanouil Papadeas 7683af09df Change 1f to 1.0 in shaders
This makes them work on Godot 3.5
2022-06-02 00:04:08 +03:00
Matteo Piovanelli 06d591c7ad
Only update brush size config if size changed (#704)
This is the fix I proposed in #703 after noticing that the code in `update_config()` was being executed twice when changing the size of brushes.
2022-06-01 14:43:52 +03:00
Emmanouil Papadeas 081ce90a08 Internal changes in SelectionTool regarding snap to grid transformation
These changes allow users to set the left (or right) mouse buttons as mapped shortcuts to the transform snap grid action, in order to automatically snap to grid while moving a selection.
2022-05-29 14:10:18 +03:00
Emmanouil Papadeas c3d56ee547 Add a warning label to window opacity if fullscreen is enabled 2022-05-28 18:23:52 +03:00
Emmanouil Papadeas 2d404dd9ab Fix window opacity not working after entering fullscreen 2022-05-28 17:29:38 +03:00
Emmanouil Papadeas 5e5925b8c6 Update OpenSave.gd 2022-05-22 00:01:17 +03:00
Emmanouil Papadeas 2ae7d638d4 Add missing menu shortcuts 2022-05-21 00:50:39 +03:00
Emmanouil Papadeas b8ed7b382e Remember grid, pixel grid, guides and rulers view menu settings
The next time Pixelorama opens, it will remember your settings.
2022-05-20 18:50:06 +03:00
Emmanouil Papadeas d7cfa87ffa Optimize Magic Wand tool based on #667 and #672 2022-05-20 17:47:19 +03:00
Emmanouil Papadeas c3c337280e Update tile mode on project switch 2022-05-20 14:08:01 +03:00
Emmanouil Papadeas 6b5a835322 Change quick color picker shortcut name 2022-05-20 10:59:25 +03:00
Emmanouil Papadeas b66ea70a92 Fix scale image aspect ratio not updating correctly when the dialog is about to appear 2022-05-19 15:16:28 +03:00
Emmanouil Papadeas 0ad3d16b57 Update translations 2022-05-18 21:46:48 +03:00
Emmanouil Papadeas e2550bba47 In the backup confirmation dialog, change "Delete" to "Discard all" and add Cancel button
Cancel and X button keep the backups in memory, discard deletes them.
2022-05-18 15:51:17 +03:00
Emmanouil Papadeas a478dee88e Treat X as delete in the backup confirmation dialog 2022-05-18 14:42:36 +03:00
Emmanouil Papadeas f327eccaa1 Delete content in all selected cels, and not when a layer is locked/invisible 2022-05-17 19:48:06 +03:00
Emmanouil Papadeas da65380169 Made left and right tool activation shortcuts configurable
Mapped to left and right mouse buttons respectively by default, as well was L1 and R1 buttons respectively in joypads. This commit should allow mouse-free drawing, since it's now possible to activate the left and right tools via joypad and keyboard buttons, thanks to the Keychain plugin.
2022-05-17 01:25:50 +03:00
Emmanouil Papadeas d028582f27 Move cursor with numpad arrow keys, joy d-pad and left stick
Similar to GraphicsGale, you can now draw without moving the mouse. Although you still need the mouse for the left and right buttons, but I'd like to make give more options to the user as well so that they can activate tools using keyboard and joypad buttons, if they like.

The numpad arrow keys did nothing previously, so nothing changes for people who are not interested in this feature. They are also configurable thanks to the Keychain plugin.
2022-05-16 21:50:19 +03:00
Emmanouil Papadeas a98424e474 Rename "confirm" and "cancel" input events
Into "transformation_confirm" and "transformation_cancel" respectively.
2022-05-16 20:01:17 +03:00
Emmanouil Papadeas 4a16700b80 Show correct tool modifier shortcuts in the tool button tooltips 2022-05-16 19:46:26 +03:00
Emmanouil Papadeas f509dfb9f6
Implement the Keychain Plugin (#700)
* Start implementing the godot_better_input plugin

* Update ShortcutEdit.gd

* Load & save preset option

* Add some groups and fix action events not being deleted on load

* Add MenuInputAction class for multiple menu accelerators

* Create a proper plugin and a BetterInput autoload

* Update menu accelerators

* Move settings to BetterInput

* Move menu enums to Global, make more MenuInputActions

* Add more menu events

* Add new groups

* Optimize BetterInput _input() method

* Remove a lot of lines of code

* Change some previous events, add ignore actions and a View menu group

* Change update_item_accelerator to update_ui

* Move MenuInputAction initialization to BetterInput.gd

* Update hint tooltips when a shortcut changes

Temporarily comment out some code regarding the configurable modifiers

* Some MenuInputAction variable name changes

* Add handle_input() to InputAction

* Update the shortcuts of buttons

* Fix shortcut selector menu position

* Change plugin name into Keychain

* Fix keyboard input dialog exiting when Enter or Space is being pressed

* Add two more groups

* Make groups folded by default

* Temporarily make tool modifier shortcuts not configurable

A temporary change, they will be made configurable again, with different actions that are currently mapped to the same events, local/independent from each other.

* Add license for Keychain

* Fix issue where a key event would be added in other input types

* Fix bug where the assigned state was not updated when the dialog appeared again

* Update Main.tscn

* Add a disabled line edit in keyboard shortcut selector to grab focus

* Load presets in the Keychain autoload

This way, the input actions get updated from the start, instead of only at the ShortcutEdit scene.

WARNING, this currently causes crashes if the menu items have no shortcut binded to them.

* Move custom settings away from Keychain.gd

To keep it the same as the upstream plugin

* Change menu enum names

* Made action_get_first_key() more general

* Use arrays for menu items instead of dictionaries, fixes crash

* Move moveable panels to Window menu

* Format

* Optimize hint tooltip updating

* Add support for translations in Keychain

* Translation changes

* Made tool modifiers configurable

Needs more testing.

* Made camera arrow key movement configurable & joypad axis support

This commit removes the ability to press Shift and Control+Shift to adjust the camera arrow key movement speed. Instead, the speed depends on the zoom level.

The right joypad analog stick is configured to move the camera by default.

* Rename presets into shortcut profiles, use Resources and let users create their own

* [skip ci] Update addons README

* Update Global.gd
2022-05-16 15:07:51 +03:00
Emmanouil Papadeas 1e0eb19c15 Don't fill color when creating a new empty frame if the color is transparent 2022-05-15 22:05:35 +03:00
Variable c1759c74eb
Draw UI improvements (#671)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* Some improvements

1) A Smarter Placement of "brushes_popup"
2) A Different Convention for image brushes (100 % instead of 1px)

* Formatting

* some more formatting
2022-05-11 15:46:29 +03:00
AlphinAlbukhari 55b5cc3932
Fix drop shadow (#690)
* Fix drop shadow

* Connect signal

AffectOptionButton didn't work
2022-05-04 01:02:20 +03:00
Variable 0232f95c84
Shader Rotation fix (#687)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* added error calculation

* revert last commit

* fixed rotation bug caused on some transparency

* fix for a bug

when selection was present

* added a comment

* added a fix when selection was enabled

* formating

* fixed another bug

* Added quick buttons for rotation
2022-05-03 19:38:29 +03:00
Emmanouil Papadeas 9e7dd1210b Fix flood fill bug mentioned in https://github.com/Orama-Interactive/Pixelorama/pull/672#issuecomment-1114762474 2022-05-03 00:58:14 +03:00
Emmanouil Papadeas 9a43d4bd34 Change "Step" and "Dithering" gradients to "Linear Step" and "Linear Dithering" 2022-05-02 16:53:13 +03:00
Emmanouil Papadeas cf926942ac
Shader-based gradients (#677)
* Add 6 shader-based gradient types

* Shaders now respect selection

* Fix step gradient

* Remove comments

* Disable step and dithering shaders in Web version

* Fixed a weird bug with dithering shaders, selection and GLES2

Having a selection, applying a dithering gradient, removing the selection and then going to the gradient dialog again causes the dithering shaders to "remember" the previous selection, even if there is no selection currently. This only happens with the two dithering shaders and only with the GLES2 renderer. Removing `uniform sampler2D dither_texture;` from the shader code seems to fix the issue, but that's obviously isn't what we want so a "proper" fix is included in this commit.

* Format & lint

* Removed old gradient code

* Change how centers work on radial step and dithering

* Made angle, center and radius option a bit more clear

* Rename bayer-matrices directory to dither-matrices

* Use DitherMatrix class

* Create dithering types programmatically

* Remove unneeded code in shaders

* Rewrite the step shader without a for loop

More optimized and works on the Web version with GLES2

* Rewrite radial step and dithering shaders without for loop

Now all shaders work on the Web version and have been optimized.

* Fix Linear & Radial size range and remove some unneeded lines

* Added size uniform to Radial Step and Radial Dither

* Swap colors in the Linear gradient

* Make size a percentage

* Make the preview look the same as the result

Didn't change the dithering shaders because they seemed to give different results.

* Remove ratio uniform and divide uvs by the radius instead

This makes more sense because the smaller the number, the smaller the radius.

* Fix linear gradient

* Change Position to percentage and "Size" to "Transition size"

* Mix gradients with original color, if the gradient colors have transparency
2022-05-02 16:12:00 +03:00
Emmanouil Papadeas 539ccb2e58 Fix issue with the bucket tool's "same color pixels" method not working in all selected cels 2022-05-01 03:28:45 +03:00
Variable 5475643079
View Export dimensions (#686)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* added error calculation

* revert last commit

* The Export file dimensions

* formating

* formatting
2022-04-30 19:32:55 +03:00
AlphinAlbukhari 74ae37eb6e
Shader based rotation (#683)
* Add Shader based rotation

* Selection, aspect ratio and edge border

* Change Shader option to Nearest neighbour (Shader)

* Resolve Conflict

* Remove Whitespaces
2022-04-29 18:54:50 +03:00
Matteo Piovanelli c44feb50a7
Refactored bucket.gd (#681)
* Refactored bucket.gd
Separated out the larger functions to ease readability and possible
future improvements.

* Removed debug comment
2022-04-29 00:56:55 +03:00
Emmanouil Papadeas 1f28672eea Fix last end of the last tag being cut off 2022-04-28 19:17:58 +03:00
Emmanouil Papadeas 09a2d70ed0 Update PreferencesDialog.tscn 2022-04-28 18:26:37 +03:00
Variable 12c9d02f12
Better timeline scrolls (#682)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* added error calculation

* revert last commit

* Updated Scrollbar behaviour

* formatting

* removed some bugs

* Update AnimationTimeline.gd

* formatting

* some more formatting +

Removed unwanted function

* formatting

* removed print()
2022-04-28 18:06:41 +03:00
Variable 252e93cc9c
Transparency improvements (#680)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* added error calculation

* revert last commit

* Error calculations

* Update UITransparency.gdshader

* Update UITransparency.gdshader

* Update UITransparency.gdshader

* used "screen_uv" instead of "UV"
2022-04-28 00:03:56 +03:00
Variable b9a841a360
Rotation improvements (#676)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* Pivot correction in case of even size

* fix the Scale3x

it should not remove the edges now

* formatting

* more formatting
2022-04-27 16:27:33 +03:00
Variable 16a2abf9b4
Added shortcuts (#673)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* Added all shortcuts

* formatting

* Removed 1 shortcut from "Fullscreen"

* Assigned shortcuts to special behaviours

* formatting

* Added configurable shortcuts to special behaviour

* formatting

* Added special behaviour shortcuts and some code im

provements

* a minor fix
2022-04-27 15:03:39 +03:00
AlphinAlbukhari 7b721ca66d
Add Drop Shadow (#674) 2022-04-27 14:48:31 +03:00
Emmanouil Papadeas 63759d3607 Remove affect_selection and has_selection checks from Shaders 2022-04-23 14:39:17 +03:00
Emmanouil Papadeas 2da5b1e944 Outline generation with shaders
This results in both better and faster results. Unfortunately, the shader does not work in the Web version, so we have to rely on the old method for that platform.
2022-04-22 21:11:02 +03:00
Emmanouil Papadeas 7215f3e0a7 Fix formatting
No linter erros fixed yet
2022-04-22 15:42:36 +03:00
Emmanouil Papadeas 19512e4516 Change "Flip" window title to "Mirror Image"
Also made Horizontal enabled by default
2022-04-22 15:38:08 +03:00
Matteo Piovanelli 1a19c3a297
Further speed up of bucket fill (#672)
* Removed some calls to can_pixel_get_drawn by
managing has_selection condition differently

* Refactored `_set_pixel` to shortcircuit.
This allowed shortcircuiting away some tests to speed up common code
paths.

* Further refactor of `_set_pixel`
Removed unused functions. Made conditions for pattern-fills clearer.

* Refactor.

* Refactor.

* Removed dev timers.
2022-04-21 04:57:39 +03:00
Emmanouil Papadeas 7c6cdadb86 Optimize shader-based image effects when there is no selection 2022-04-20 03:06:58 +03:00
Emmanouil Papadeas 1e73ce5aa6 Fix export bug where the path is being changed if there's a folder with the same name as the file 2022-04-20 02:49:48 +03:00
Variable 77513b6ba3
Export conflict (#669)
* add limit change with brush

* Delete Draw.gd

* Delete BaseTool.gd

* added more info about export conflict

* more info about export conflict

* Update Export.gd

* Update ExportDialog.tscn

* fixed a small mistake
2022-04-19 19:29:21 +03:00
Manolis Papadeas bdd32a8239 Make marching ants shader ratio-independent 2022-04-18 15:32:14 +03:00
Matteo Piovanelli 6a7ee3407c
Upgrade/floodfill (#667)
* Implemented floodfill routine by Shawn Hargreaves

* Removed performance timers used for testing

* Reformatting file after setting "Trim Trailing
Whitespace On Save".

* Refactoring to respect code guidelines.

* More reformatting

* More refactoring

* Refactor: added # gdlint: ignore=max-line-length
to line the parser has me set to longer than 100 chars

* Manage selected areas
2022-04-16 12:22:51 +03:00
Manolis Papadeas f42f75aa28 Update TopMenuContainer.gd 2022-04-14 18:33:42 +03:00
Manolis Papadeas fc482831a8 Update tags to 0.10 2022-04-14 18:32:39 +03:00
Manolis Papadeas 93c122f07b Update Uch and Kalpar's social media links 2022-04-14 17:29:32 +03:00
Manolis Papadeas bc11dcfd4b Update the splash screen artworks 2022-04-14 01:13:42 +03:00
Manolis Papadeas 87c4d4c310 Update AboutDialog.gd 2022-04-11 00:43:44 +03:00
Manolis Papadeas b0e4636c66 Properly center the splash screen on application start 2022-04-10 15:41:07 +03:00
Manolis Papadeas d8830d7f06 bool support for shaders
Feature not exposed to the end user yet
2022-04-10 00:04:45 +03:00
Manolis Papadeas c7f9f1d23b vec2 support for shaders
Feature not exposed to the end user yet
2022-04-09 23:28:57 +03:00
Manolis Papadeas d579118bb1 Load textures for sampler2D uniforms in the experimental shader feature
Feature not exposed to the end user yet
2022-04-09 03:42:34 +03:00
Manolis Papadeas 41d9add6a7 Change shader color in the experimental shader feature
Feature not exposed to the end user yet
2022-04-08 02:57:58 +03:00
Manolis Papadeas 8e9243b8c1 Update Main.gd 2022-04-06 00:30:34 +03:00
Manolis Papadeas 980b39d21b Update AboutDialog.gd 2022-04-02 17:10:16 +03:00
Manolis Papadeas 44e5fcfb87 Change global tool option textures 2022-04-01 13:45:24 +03:00
Manolis Papadeas d01d0a287a Make cut not work on locked/invisible layers 2022-03-31 17:30:25 +03:00
Manolis Papadeas 11b6af07f1 Update Translations 2022-03-31 02:29:23 +03:00
Manolis Papadeas a79f368f41 Fix aspect ratio in scale image to work as it does in create image 2022-03-30 16:12:19 +03:00
Manolis Papadeas 8a5cc6860f Move layer and frame initial creation code to Main.gd
From Global.gd
2022-03-29 03:14:41 +03:00
Manolis Papadeas 66ad745c52 Minor code changes 2022-03-29 02:35:32 +03:00
Manolis Papadeas 4cdd20a2fe Fix issue with export preview not working when importing an image 2022-03-27 04:19:47 +03:00
Manolis Papadeas e901fc774a Replace "Export" with "Overwrite" when importing a png
When exporting an imported image, the export will happen immediately, without having the export dialog appear, unless "Export as..." is selected. For .png imported images, the menu option will display "Overwrite" instead of "Export". This makes it clear that if Control + E is pressed on an imported png, that file will be overwritten.
2022-03-25 02:00:40 +02:00
Manolis Papadeas bd6f850ab5 Rename "Flip" into "Mirror Image" 2022-03-24 20:01:31 +02:00
Manolis Papadeas 3727caf9c4 Revert "Use L8 format for selection texture"
This reverts commit 8a3414f83a.
2022-03-23 03:56:47 +02:00
Manolis Papadeas 8a3414f83a Use L8 format for selection texture
Instead of LA8. This should result in slightly less memory usage and is more on par with Godot's BitMap "convert_to_image" method, which will be exposed in Godot 3.5.
2022-03-23 01:48:58 +02:00
Manolis Papadeas 8624ed6da8 Fix macOS shortcuts 2022-03-22 01:48:14 +02:00
Manolis Papadeas 9648b48a96 Remove empty project when importing an image
This should no longer keep empty canvases when importing images
2022-03-21 23:33:45 +02:00
Manolis Papadeas 4cf9c57e84 Don't reset export status when a pxo is saved 2022-03-21 23:07:57 +02:00
Manolis Papadeas 57729ef4e9 Move Moveable Panels to the Panels submenu 2022-03-21 18:04:26 +02:00
Manolis Papadeas bf98dd18e6 Remove the "Palettes" label from the Palettes panel 2022-03-21 16:24:03 +02:00
Manolis Papadeas 1c3103e06b Scale custom cursor with UI size - closes #642 2022-03-21 02:24:13 +02:00
Manolis Papadeas 0e79138d87 Another canvas texture optimization + bug fix with resizing 2022-03-20 18:52:48 +02:00
ArthyChaux 9e5db16994
Optimize canvas texture updates (#661)
In this line, a new texture is generated each time the canvas is updated it seems :
But it is mentionned in the documentation to use `void set_data(image: Image)` instead for slightly faster results, which updates the texture instead of creating a new one.

I hope that it is relevant !

Also, if it is approved, this change should be applied to everywhere it is used (except when initializing the texture)
2022-03-19 19:21:07 +02:00
Manolis Papadeas 9411f37a47 Add a confirmation dialog when deleting a layout 2022-03-18 04:21:38 +02:00
Manolis Papadeas 9128b455e6 Transparent canvas now works properly with scaled UI 2022-03-18 01:08:00 +02:00
Manolis Papadeas 4059cb018b In ResizeCanvas, always set the spinbox values to the current project size 2022-03-18 00:07:40 +02:00
Manolis Papadeas 790cd8533a Changes to ManageLayouts dialog 2022-03-18 00:03:53 +02:00
Manolis Papadeas 21b4f3369f Select layer when clicking a layer button (visible, lock, etc) 2022-03-17 00:12:00 +02:00
Manolis Papadeas bffc36a018 Change Layout menu and rename Edit Mode to Moveable Panels 2022-03-16 00:30:24 +02:00
Manolis Papadeas 5d3963d495 Make panel tabs always visible if there are 2 or more tabs in a single panel 2022-03-12 20:46:17 +02:00