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.
* 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
* 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
* 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
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.
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.
* 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>
* 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
* 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
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.