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

345 commits

Author SHA1 Message Date
Emmanouil Papadeas a698668930 Fix #1157 for the polygon select and the curve tool as well 2024-12-21 03:52:33 +02:00
Emmanouil Papadeas 59254b943f Attempt to fix left tool preview not being shown when a right tool with a preview is selected
Maybe fixes #1157
2024-12-21 03:44:54 +02:00
Emmanouil Papadeas 360aa250c4 Hide the horizontal alignment option from the text tool
It's not doing anything at the moment and I am unsure why. We could expose it again if we figure it out.
2024-12-18 23:21:28 +02:00
Emmanouil Papadeas 2d81bd495a Move value and basis slider files into a folder 2024-12-17 01:04:56 +02:00
Emmanouil Papadeas 02d1900dc2 Make brush size in draw tools not affect the draw tiles mode
We could change it again if we implement it in a non-confusing way
2024-12-14 16:05:51 +02:00
Emmanouil Papadeas 5ec316a50f Some minor UI improvements in the text tool
The text tool's caret is now blinking, and the width of the border should now change depending on the zoom value
2024-12-12 21:36:56 +02:00
Emmanouil Papadeas 3c3de7823a Fix brush preview turning white for a moment when switching tools
Continuation of b7c34f42
2024-12-09 13:38:58 +02:00
Emmanouil Papadeas d41037d2df Fix tilemap manual editing mode not working with shape & text tools, and fixed issues with the pencil tool
Not the most performance-friendly solution, but it works. If users encounter performance issues in the future, we should rewrite this, as it does the same for loop two times.
2024-12-06 18:06:23 +02:00
Emmanouil Papadeas b7c34f4233 Fix pencil/eraser/shading previews turning white for a brief moment when changing image brushes 2024-12-06 04:11:05 +02:00
Emmanouil Papadeas 1ea80a342a Fix some unintentional behaviors with tilemap layer tile editing modes 2024-12-06 04:03:57 +02:00
Emmanouil Papadeas f91bb18fb2
Implement tilemap layers (#1146) 2024-12-05 03:57:44 +02:00
Emmanouil Papadeas b48bb4a094 Fix moving selections with arrow keys moving two pixels instead of one 2024-12-04 01:19:45 +02:00
Variable ff5713ae91
When picking color, ensure that the correct index is selected in palette (#1144)
* When picking color, ensure that the correct index is selected

* if drawing over same color in index mode, check and update index as well

* revert an optimization (croping indices image before display)

* typo
2024-12-02 19:44:52 +02:00
Variable 6224d06428
Allow multiple Grids (#1122)
* Allow upto 10 grids

* Fixed more stuff

* fixed a bug

* formatting

* removed some left over stuff

* linting

* formatting and a bugfix
2024-11-25 15:57:13 +02:00
Emmanouil Papadeas 3fb8484ac5 Use Control + mouse wheel to increase the size of the text tool 2024-11-23 01:00:49 +02:00
Emmanouil Papadeas 0484b1012f Fix Delete button and fill selection mode of the bucket tool not working with indexed mode 2024-11-23 00:58:34 +02:00
Emmanouil Papadeas 558140b309 Add partial logic for diagonal mirroring
Still WIP, no buttons and guides exposed yet.
2024-11-21 03:25:41 +02:00
Emmanouil Papadeas 849b815562 Further simplify mirror_array() 2024-11-21 02:21:11 +02:00
Emmanouil Papadeas 3615ce087c Reduce duplicated code by calling mirror_array by tools less times 2024-11-21 02:15:50 +02:00
Emmanouil Papadeas 2d28136449
Implement indexed mode (#1136)
* Create a custom PixeloramaImage class, initial support for indexed mode

* Convert opened projects and images to indexed mode

* Use shaders for RGB to Indexed conversion and vice versa

* Add `is_indexed` variable in PixeloramaImage

* Basic undo/redo support for indexed mode when drawing

* Make image effects respect indexed mode

* Move code from image effects to ShaderImageEffect instead

* Bucket tool works with indexed mode

* Move and selection tools works with indexed mode

* Brushes respect indexed mode

* Add color_mode variable and some helper methods in Project

Replace hard-coded cases of Image.FORMAT_RGBA8 with `Project.get_image_format()` just in case we want to add more formats in the future

* Add a helper new_empty_image() method to Project

* Set new images to indexed if the project is indexed

* Change color modes from the Image menu

* Fix open image to replace cel

* Load/save indices in pxo files

* Merging layers works with indexed mode

* Layer effects respect indexed mode

* Add an `other_image` parameter to `PixeloramaImage.add_data_to_dictionary()`

* Scale image works with indexed mode

* Resizing works with indexed mode

* Fix non-shader rotation not working with indexed mode

* Minor refactor of PixeloramaImage's set_pixelv_custom()

* Make the text tool work with indexed mode

* Remove print from PixeloramaImage

* Rename "PixeloramaImage" to "ImageExtended"

* Add docstrings in ImageExtended

* Set color mode from the create new image dialog

* Update Translations.pot

* Show the color mode in the project properties dialog
2024-11-20 14:41:37 +02:00
Emmanouil Papadeas 428e5edb8f
Add a text tool (#1134)
* Initial port of the text tool to Godot 4

* Change font (WIP)

* Add antialiasing option and remove some old unneeded lines

* Remove outline code

* Add horizontal alignment and update the text edit font size

* Improve the text edit

* Don't activate tools while typing

* Format

* Give input priority to the text edit so the key X and shortcuts such as control-z work in the text edit

* Add style settings for bold and italic

* Fix text going blank when changing font

* Use `font.draw_multiline_string()`

* Change the move behavior of the text tool, add confirm and cancel buttons

* Compress images on undo/redo

* Fix text position
2024-11-19 01:20:34 +02:00
Emmanouil Papadeas 785d8cfc83 Hide the density slider by default
So that it doesn't appear in the shape tools, where it has no effect.
2024-11-14 16:22:53 +02:00
Emmanouil Papadeas 36329efaf6 Add density to the square & circle brushes
00% density means that the brush gets completely drawn, anything less leaves gaps inside the brush, acting like a spray tool.
2024-11-14 01:02:51 +02:00
Emmanouil Papadeas ad77d98f42 Slightly optimize circle brushes by only calling the DrawingAlgos methods once while drawing
They keep getting called when size dynamics are enabled, however.
2024-11-13 02:55:15 +02:00
Emmanouil Papadeas 8beb79a33b Fix memory leak where the project remained referenced in BaseDraw even when its tab was closed
Another memory leak remains in Recorder.gd, where the first project forever remains referenced in memory, until the user changes the project from the option button. Perhaps we should remove that option button completely and always record the current project, that also sounds like the intended behavior to me.
2024-11-03 03:36:37 +02:00
Emmanouil Papadeas e2971a8fe9 Add UI buttons for confirming and cancelling a transformation
Needed especially for users without a keyboard.
2024-10-31 23:49:58 +02:00
Emmanouil Papadeas 17d56bb432 Update tool child scenes to reflect the changes of #1105
Just to fix some warnings
2024-10-22 15:43:07 +03:00
Emmanouil Papadeas c83680183b Minor changes in Shading.tscn 2024-10-17 13:08:43 +03:00
Emmanouil Papadeas 4dc55e538e Fix issues when picking color with the bucket tool
1) The bucket tool now picks colors from the top-most layer, like the rest of the drawing tools.
2) Using the tool while moving the cursor and also holding the color picker shortcut (Alt by default), now picks colors instead of using the bucket tool.
2024-10-17 02:34:27 +03:00
Variable 3863cbaee7
Add a preference to share options between tools (#1120)
* Add share config button

* fill parameter now saves with curve tool

* rename _fill to _fill_inside for sync consistency (fill in pencil and shape tools basically represent the same thing)

* add icon

* Move the option to the preferences

* Add string to Translations.pot

* Re-introduce `is_syncing`

---------

Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2024-10-16 16:00:20 +03:00
Variable 4561c1fee4
improved rotate/flip brush UI (#1105)
* Update BaseDraw.tscn

* Update BaseDraw.gd

* Implemented proposed changed, Also added a VFlowContainer for Rotate options
2024-10-14 16:08:10 +03:00
Emmanouil Papadeas 9899734090 Ensure that the preview clears when switching to a different tool 2024-10-13 14:22:01 +03:00
Emmanouil Papadeas 1ed52903b3 Implement the ability to change the font of a 3D text
This code will also be useful for the text tool
2024-10-12 16:30:16 +03:00
Emmanouil Papadeas 9fcb06aa72 Add a 3D text line spacing option 2024-10-12 14:31:15 +03:00
Emmanouil Papadeas bbf0ae8040 Add a 3D text depth option 2024-10-12 01:14:37 +03:00
Emmanouil Papadeas 970b24ec40 Fix 3DShapeEdit option values not updating when selecting 3D objects 2024-10-12 00:52:18 +03:00
Emmanouil Papadeas b9bf8290b0 Remove Global.animation_timer 2024-10-11 16:38:35 +03:00
Emmanouil Papadeas b79ce0ae15 Add a new "CanvasCameras" node group for the canvas cameras 2024-10-11 14:44:21 +03:00
Variable 0551b23a19
ColorReplace Shading Mode (#1107)
* ColorReplace Sdading Mode

* Fixed changing colors array by mistake

* the tool now takes more things into account

* Make it work with transparent colors (more consistent with aseprite), and improve ui a bit. This should be the last commit to this pr
2024-10-09 11:29:46 +03:00
Variable b5ded76654
Stretch mode and expand mode fixes (#1103)
* Set dynamics dialog to correct size after something is made visible or hidden

* fixed aspects of brush buttons

* Fixed wrong stretch mode

* improved rotation brush UI

* Update PaintSelect.tscn

* formatting

* fix all stretch modes

* fix export expand mode

* Fix more Stretch modes

* Fixed Resize canvas transparent checker

* removed an addition

The change: 625fe4cdd1
is moved over to a new pr

* moved some changes to another pr

* Moved some more changes to another pr
2024-09-17 21:38:21 +03:00
Emmanouil Papadeas 1b48eac843 Fix crash when using the move tool snapped to the grid 2024-09-12 18:26:42 +03:00
Emmanouil Papadeas 9650dae678 Optimize the pencil & curve's fill inside option by making them check fewer pixels
Same logic as the previous commit
2024-09-05 03:50:37 +03:00
Emmanouil Papadeas 1e9c8487ba Optimize the lasso & polygon select tools by making them check fewer pixels
The time they take to complete now depends on the size of the selection, rather than checking all of the pixels of the entire canvas.
2024-09-05 03:34:30 +03:00
Emmanouil Papadeas 04a5292672 Use exact match for the draw_color_picker shortcut 2024-08-15 04:36:33 +03:00
Emmanouil Papadeas 15c186d8a1 Re-introduce #729 to fix an issue where the bucket tool filled with a slightly wrong color
We should probably keep this issue in mind though in case we find a better solution, but this seems to be working for now.
2024-08-12 16:36:20 +03:00
Emmanouil Papadeas 1678738d75 Add tolerance to the magic wand, rename "similarity" to "tolerance" in the select by color tool and make it work the inverse way
Continuation of b0a284583b for the selection tools.
2024-08-10 18:43:04 +03:00
Emmanouil Papadeas b0a284583b Add tolerance to the bucket's "similar area" mode, rename "similarity" to "tolerance" and make it work the inverse way
A slightly breaking change for a minor update, but one that needed to be done. The bucket tool's "similarity" (now renamed to "tolerance") used to work the opposite way from all other software, the maximum value meant exact color match and 0 meant no color match. Now it works the inverse way to make it be consistent with other software, and the range is now 0-255 instead of 0-100. 0 means exact color match, 255 means no color match. And tolerance also now works for the "similar area" mode as well.
2024-08-10 18:20:42 +03:00
Emmanouil Papadeas a3d7725a44 Fix popups appearing in wrong places when single window mode is disabled 2024-08-03 22:36:05 +03:00
Emmanouil Papadeas c0c391674d [skip ci] Change instances of "yield" to "await" in comments 2024-08-02 00:42:14 +03:00
Emmanouil Papadeas 8ba2b62921 Mirror the previews of the shape tools
Now they are consistent with the selection tools
2024-07-31 22:23:50 +03:00