1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-16 02:23:15 +00:00
Commit graph

337 commits

Author SHA1 Message Date
Emmanouil Papadeas
ad83823f58 Remove transformations from cells when using auto or stack mode 2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
442285d15f Make undo/redo store tilemap cell indices and tileset tiles
Fixes issues with cases 0.5 and 5 of auto mode, and should be a better system overall. Only works with BaseDraw tools, needs to be applied everywhere as well.
2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
b059ae4c8b Write some documentation in CelTIleMap
WIP
2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
5e4eebe139 Rename some variables and methods in CelTileMap 2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
2c6dcdcf78 Add documentation for LayerTileMap and TileSetCustom, along with a class description for CelTileMap 2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
ac75c8197c Experimental undo redo for tileset tiles 2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
5f10a913d4 Fix manual mode when the tilemap is empty. 2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
3bf556345d Support tile transformation, no undo/redo yet 2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
4e62d00296 Add logic for checking if two tiles are equal with transformations applied to them
There is currently no exposed way to apply transformations to tiles.
2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
a696db3fc0 Refactor CelTileMap to eventually support alternative tiles
Such as rotated and flipped tiles
2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
ad1252c142 Manual mode should update other cels that have the same tileset 2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
2301ba9fcc Make manual tile editing mode automatically update all other image portions that have the same tile index 2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
04ab9faa87 Fix out of bounds issues when undoing/redoing when the place tiles mode is enabled 2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
9c5b0f0f76 Add a dialog when creating a tilemap layer to allow users to set the tileset's settings 2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
419154bafe Resize indices on project resize 2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
f077b147e9 Save and load to/from pxo files 2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
c24a2240fe Prevent from setting tile indices out of bounds of the canvas 2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
d8c27a7966 Place tiles mode works with eraser and color picker tools 2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
5b50270ee2 Undo/redo now removes tiles and re-indexes tilemap tiles 2024-12-04 01:21:54 +02:00
Emmanouil Papadeas
664197c9f3 Implement placing tiles for pencil tool
Still needs undo support
2024-12-04 01:21:53 +02:00
Emmanouil Papadeas
0678fd8719 Tileset panel UI improvements 2024-12-04 01:21:53 +02:00
Emmanouil Papadeas
12eda32176 Properly update the tileset when using any tool 2024-12-04 01:21:53 +02:00
Emmanouil Papadeas
6b77e30e08 Improve tileset panel UI updating logic 2024-12-04 01:21:53 +02:00
Emmanouil Papadeas
6c79136f09 Prevent from drawing on empty image portions on manual mode. 2024-12-04 01:21:53 +02:00
Emmanouil Papadeas
cd6212d892 Make the manual mode work, kind of 2024-12-04 01:21:53 +02:00
Emmanouil Papadeas
d95c3f7555 Properly implement the auto tile editing mode
Should work well now.
2024-12-04 01:21:53 +02:00
Emmanouil Papadeas
9187d8a9be Don't delete tiles that have been added using the stack mode 2024-12-04 01:21:53 +02:00
Emmanouil Papadeas
dd4f6b7b6c Change tile editing mode from the UI 2024-12-04 01:21:53 +02:00
Emmanouil Papadeas
27c0787f26 Make manual mode work when the tileset is empty 2024-12-04 01:21:53 +02:00
Emmanouil Papadeas
f42454ef03 Improve tileset editing logic 2024-12-04 01:21:53 +02:00
Emmanouil Papadeas
a8755bd92f Support ImageExtended 2024-12-04 01:21:53 +02:00
Emmanouil Papadeas
4f1ee0e828 Add a tileset panel
Code is a bit meh, needs to be written better.
2024-12-04 01:21:53 +02:00
Emmanouil Papadeas
e119a91f5b Add tilemap layers 2024-12-04 01:21:53 +02:00
Emmanouil Papadeas
062889b4bb Implement all draw modes (untested) 2024-12-04 01:21:53 +02:00
Emmanouil Papadeas
174f7d4b9f Initial work for tilemap layers 2024-12-04 01:21:53 +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
Emmanouil Papadeas
be8b7728e4 [skip ci] Fix typo in ImageExtended docstrings 2024-11-29 20:19:19 +02:00
Variable
31981a1def
Added a way to see index of color (plus bugfixes) (#1143)
* add a way to see indices

* fix some things

* Fixed more than one swatch selected if there is the same color available in an earlier swatch

* fixed wrong index drawn when moved to an smpty swatch

* make active_button public

* fixed wrong color getting stored in   array (similar fix to #1108.)

* If the color selected in the palette is the same then it should take prioity.

* formatting

* hide 0 index
2024-11-29 19:10:02 +02:00
Emmanouil Papadeas
01b55aca07 Fix crash when using indexed mode without a palette 2024-11-23 14:17:41 +02:00
Emmanouil Papadeas
b87a8e2ab8 Fix cel copying not working with indexed mode 2024-11-22 21:00:38 +02:00
Emmanouil Papadeas
e6c4a72158 Fix crash when using indexed mode and the palette has empty swatches between colors 2024-11-22 20:47:38 +02:00
Emmanouil Papadeas
bd7d3b19cc Add a crop_image boolean parameter to Palette.convert_to_image()
Fixes some issues with the Palettize effect where the output would be different if the palette size changed and empty swatches were added, even if the colors themselves stayed the same.
2024-11-22 17:56:39 +02:00
Emmanouil Papadeas
d0ecf3b03d Center diagonal symmetry guides when initializing a new project
The guides appear centered, but the symmetry itself is not working properly yet
2024-11-21 16:33:19 +02:00
Emmanouil Papadeas
3d65e48c92 Add backend for diagonal mirror buttons
The buttons are not yet visible
2024-11-21 12:48:52 +02:00
Emmanouil Papadeas
aa1731b701 Initial work on diagonal symmetry guides
Still no buttons yet, and they cannot be moved yet.
2024-11-21 04:00:40 +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
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
0d6b140dea Add border selection, fix some missing translation strings 2024-11-15 01:41:44 +02:00
Emmanouil Papadeas
dec698024c Implement selection expanding and shrinking via the Select menu 2024-11-14 17:59:53 +02:00
Emmanouil Papadeas
b0b1361722 Fix layer effect slider values being rounded to the nearest integer 2024-11-12 00:47:53 +02:00