Commit Graph

8935 Commits

Author SHA1 Message Date
Martín Capello
ea43c5f6c8 Adjust styles to make them work with the new buttonset 2023-02-27 09:44:42 -03:00
Martín Capello
cc3c421391 Initialize theme for HueSaturationWindow 2023-02-27 09:43:48 -03:00
Martín Capello
3ab993d1d6 Update ButtonSet to use theme's styles 2023-02-27 09:43:48 -03:00
Martín Capello
40426075f2 Add gap, gap-rows, and gap-columns style attributes 2023-02-27 09:43:48 -03:00
Martín Capello
5325f56f67 Allow overriding the icon part used by icon layers with the icon provided by a widget 2023-02-27 09:43:48 -03:00
Martín Capello
1783704a53 Fix positioning of text and icon layers to avoid setting values that are not a multiple of the gui scale 2023-02-27 09:43:48 -03:00
Martín Capello
d3f01ebe17 Add width, height, minwidth, minheight, maxwidth, and maxheight attributes to styles 2023-02-27 09:43:48 -03:00
Martín Capello
e002316466 Take into account padding when painting text and icon layers 2023-02-27 09:43:48 -03:00
Martín Capello
dded1f6eae Add mnemonics attribute for font and styles to enable/disable accelerators underlining 2023-02-27 09:43:48 -03:00
Martín Capello
195a8d0e92 Fix border, margin, and padding attributes inheritance 2023-02-27 09:43:48 -03:00
Martín Capello
11dc816878 Add "capture" state to style layer states 2023-02-27 09:43:48 -03:00
Martín Capello
598e50be1d Fix brush icon scale for brush size button when guiscale is greater than 1 2023-02-27 09:43:48 -03:00
David Capello
c900327675 Add switch for "multiple windows" in Edit > Preferences > General
As the "multiple windows" feature is still buggy (#3556) and we've
disabled it by default, it's nice to make this option more visible (in
the General section) so users reliant on this will find the switch
quickly.
2023-02-24 17:11:51 -03:00
David Capello
495a0b4684 Minor changes in the Edit > Preferences > Experimental section 2023-02-24 17:06:44 -03:00
David Capello
24b273f806 [lua] Remove "remaptileset" sprite event
It's not safe to listen this event from a script because it can be
called from a background thread. We keep the code for a future
solution (in case that it can be found).

In other case, consider to finally delete this code.
2023-02-24 12:50:33 -03:00
David Capello
c3c1d29739 Update laf and clip submodules 2023-02-24 12:23:16 -03:00
David Capello
c2f8335891 [lua] Add Timer() type (fix #3251) 2023-02-22 20:00:07 -03:00
David Capello
835aa3f83d Use std::nullptr_t defined in <cstddef> 2023-02-22 19:55:32 -03:00
David Capello
cef84ad113 [lua] Fix regression, Dialog() must create a window with titlebar
Added a new Dialog{ notitlebar=true } parameter to avoid showing a
title bar explicitly. So we can continue using Dialog() to create
dialogs with the default "Script" title.

Regression introduced in 453d9c2168
2023-02-22 18:17:26 -03:00
David Capello
cbe62e09e3 Add note about size of chunks and properties on .aseprite specs 2023-02-22 17:11:37 -03:00
David Capello
33a6a1c97e Add some tests for all_elements_of_same_type() function 2023-02-22 15:59:03 -03:00
David Capello
8f5e8256cf Replace INT/UINT_COMPATIBLE/IS_REDUCIBLE_INT macros w/templates 2023-02-22 15:58:47 -03:00
David Capello
70a388177d Move code related to UserData::Variants to doc/user_data.cpp
Only code that is related to <iostream> IO is in _io.cpp files.
2023-02-22 15:22:35 -03:00
Martín Capello
a7b5ab24bb Add (int) cast to constant to avoid issue with MSVC jumping the condition when it shouldn't 2023-02-22 12:51:51 -03:00
Martín Capello
062d1d922c Reduce the size of integer representations when possible 2023-02-22 12:51:51 -03:00
Martín Capello
47a1c407c3 Update the way vectors are serialized to support mixed elements types 2023-02-22 12:51:51 -03:00
Martín Capello
8b547adfb7 Update vector spec to support mixed types of elements 2023-02-22 12:51:51 -03:00
Gaspar Capello
fae3c6566c Fix don't create new tiles on tilemap layer in an empty cel with hasTileManagementPlugin. 2023-02-22 12:21:36 -03:00
David Capello
02b273d933 Remove some unused member functions from Timeline 2023-02-16 17:21:39 -03:00
David Capello
c70cb0d882 Minor rewording in the .aseprite specs 2023-02-16 17:20:12 -03:00
David Capello
64ce25fae2 Add property to disable the standard tilemap UI
Added a Sprite.tileManagementPlugin property for plugins that want to
replace the standard tilemap/tileset interface. This includes a new
external file field in .aseprite files to specify that the sprite
tiles are controlled by a specific plugin.

Once this property is set, the standard tilemap/tileset modes
selectors will disappear and the only way to make then available will
be setting this property to nil/empty string again.

Fix https://github.com/aseprite/Attachment-System/issues/21
2023-02-15 18:55:21 -03:00
David Capello
9475ff67d4 Update laf module 2023-02-14 13:54:32 -03:00
David Capello
ccef9cee4f Cache compressed tileset information from .aseprite files on memory
We've added an experimental option (enabled by default) to keep the
compressed tileset data when we load/save a .aseprite file to avoid
recompressing each time we save (and only compressing the tileset if
tiles are modified).

This is an attempt to make the save operation faster when we use
sprites with several tilemap layers + large tilesets (many tiles, with
big tiles).

Reference: https://github.com/aseprite/Attachment-System/issues/54
2023-02-14 13:03:06 -03:00
David Capello
6603775368 Minor refactor in .aseprite decoder/encoder
We've tested writing uncompressed tilesets, it's too slow for big
tilesets. Anyway read_raw_image/write_raw_image now support saving
uncompressed tilemaps if necessary in the future.
2023-02-14 12:29:49 -03:00
David Capello
eee79f5520 Don't access Preferences instance from dio::DecodeDelegate impl 2023-02-14 12:12:57 -03:00
David Capello
a5a1d22705 Add some tests to encode/decode tile properties 2023-02-13 17:21:42 -03:00
David Capello
1b3998af01 Minor change in doc::Tileset internal structure
Merged m_tiles and m_datas in one vector.
2023-02-13 17:20:40 -03:00
David Capello
57e43c76b8 Detect scripts that modify a sprite when we are undoing/redoing 2023-02-09 07:43:33 -03:00
David Capello
67bb8f49ea Remove unused parameter in NEED_BAR() macro 2023-02-02 11:54:13 -03:00
David Capello
28749edf10 Fix segfault with -save-as between gif -> qoi from CLI
This can happen when any fatal error happens in
createSaveDocumentOperation(). The function must return nullptr to
stop the operation and avoid the regular saving process. This is
already checked in the GUI, but we have to do the same when the fatal
error happens from the CLI.
2023-02-02 11:50:34 -03:00
Martín Capello
45ce79e594
Merge pull request #3682 from aseprite/tile-set-image
[lua] Add Tile_set_image method
2023-01-27 10:01:25 -03:00
Gaspar Capello
e56a78e0d6 [lua] Add Tile_set_image method 2023-01-25 17:12:26 -03:00
David Capello
98f2964f6f Add Widget::setMinMaxSize() to set min/max size at the same time (fix #3652) 2023-01-18 11:39:00 -03:00
David Capello
0775b0d8ba Take care of an empty tileset in doc::Tilesets collection
We cannot delete a tileset yet from Aseprite UI, but now an extension
can do it through Sprite:deleteTileset(). Deleting the non-last
tileset will create an Tilesets array with an empty (nullptr) slot on
it (so tileset indexes are not changed, and for the future, if some
external file is referencing that tileset index, the reference will be
kept).

Related to https://github.com/aseprite/Attachment-System/issues/19
2023-01-17 17:49:21 -03:00
David Capello
6080af5346 Keep/restore the timeline position for each sprite/DocView (fix #3676)
In this way the store (in memory) the exact timeline position for each
DocView. Useful when editing multiple sprites and the timeline jumps
from one side to another.
2023-01-17 17:17:57 -03:00
David Capello
f536327fc1 Add app.transaction(string, function) overload
In this way we can specify the transaction/undo-redo label from a
script.
2023-01-17 15:39:16 -03:00
Gaspar Capello
e0aaa76e9c Add warning to Sprite:newTile() and Sprite:deleteTile()
Now, if the tileset does not belong to the sprite object, the lua engine throws an error. Also added a warning when tile_index = 0 on Sprite:deleteTile()
2023-01-16 10:42:31 -03:00
David Capello
60034267e1 Merge branch 'save-restore-userdata-undo-backup' (fix #3633) 2023-01-16 10:34:43 -03:00
David Capello
faabacdd39 [lua] Fix undo/redo of tileset properties changes (name/baseIndex) 2023-01-13 19:16:15 -03:00
David Capello
11a3e634b1 Fix bug undoing tileset deletion wasn't restoring its name correctly
Actually it looks like a long-standing bug in the write/read_tileset()
functions where tileset names aren't saved (so another bug fixed with
this change is that restoring a tileset from a crashes session/file,
will restore the tileset name correctly).
2023-01-13 18:54:31 -03:00