By default Aseprite will not try to match flipped versions of the
tiles (as it requires more CPU), but when we create a tileset we can
specify which flips can be matched automatically (new
Tileset::matchFlags() property).
These flags are just for the Auto mode, if we manually insert a
flipped tile, that is always supported, even when the matchFlags() are
not specified.
The assert() in remove_unused_tiles_from_tileset() checking for the
tiles histograms was failing because we weren't adjusting the
histogram correctly when a tile w/a flag is replaced w/another without
flags.
* Added a new app::Color type for tiles, to store the flags of the
picked tile.
* Fixed color bar/status bar with a new draw_tile() to draw tiles
with flip flags.
Something interesting is that Image:drawPixel() must ask for a rehash
to the tileset when the tile is modified, maybe we can find a better
way to handle this in the future.
* Changed the "90cw" flag to "diagonal flip" (the tile should be
rendered with X/Y axis switched in this case)
* Each time we read/write an .aseprite file we have to convert
the mask/shift from the file to the values expected in
memory (tile_f_xflip/yflip/dflip)
Changed the required size to its minimum (6 instead of 8).
Minor refactor from 1c3224a716
All these values are hard-coded in DitherItem (so we cannot use
theme-related values yet for this).
Added offset to dithering selector dropdown width to avoid X dimension scrollbar obscuring the bottom of the dropdown. This also removes the need for a vertical scrollbar for the generic number of dithering options.
Related to Issue #4001
If the sprite contained only one layer group, and we tried to delete
one child, we got an error message about "You cannot delete all
layers". This fixes this (the error message is only when we delete the
last top level layer).
E.g. If we configure Shift+scroll wheel to "Change Layer" action, and
Shift+J to delete a layer, we can press Shift key and move through
layers with the mouse whell while we press the Shift key, and if we
press J (without releasing the Shift) start deleting layers. At some
point a crash will happen.
This change was introduced in dd7e27a098
as a possible fix for #4024, but the change is too disruptive to be
introduced at this stage, we need some extra UI elements to make the
drag & drop accessible in both modes: the default v1.2 behavior, and
a possible new selection mode, e.g. #1498