Commit Graph

8868 Commits

Author SHA1 Message Date
David Capello
453d9c2168 [lua] Add possibility to create dialogs without titlebar 2023-01-11 09:46:21 -03:00
David Capello
f5a79ce3b8 [lua] Add possibility to specify parent dialog 2023-01-11 09:38:19 -03:00
David Capello
7460e5f830 [lua] Add support to paint horizontal/vertical theme parts (e.g. separators) 2023-01-10 16:58:28 -03:00
David Capello
9e34656694 Fix saving the properties maps when there is an empty map
The exact number of maps specified in the header of the properties
chunk must be saved in the chunk data.
2023-01-09 15:55:09 -03:00
David Capello
0387337100 Test that saving empty property maps corrupt the .aseprite file 2023-01-09 15:54:30 -03:00
David Capello
e66985a06a Minor change in ase_file_write_property_value() to use variant type
Using a switch/case is better to decide the variant type (instead of
casting type by type).
2023-01-09 15:52:00 -03:00
David Capello
dd33cef4be Store one time each extension name in the external files chunk in .aseprite files
We've refactored the AsepriteExternalFiles struct to make it a
class (hiding members), storing maps ID -> filename per file
type (e.g. so we don't mix external tileset filenames with extensions
names, etc.), and re-using IDs for extensions names with the same
name (there is no need to store the same extension name multiple times
in the external files chunk).
2023-01-09 14:49:37 -03:00
David Capello
4232410719 Simplify AsepriteExternalFiles using one std::map for filenames/types 2023-01-09 12:53:06 -03:00
David Capello
bb3ba19fc6 Minor changes in .aseprite decoder/encoder to avoid depending on exceptions to control flow 2023-01-09 12:53:04 -03:00
David Capello
178702730b Update INSTALL instructions to install clang on Ubuntu (fix #3650) 2023-01-09 09:47:28 -03:00
David Capello
9b853fc672 Update INSTALL minimum platforms used 2023-01-09 09:47:14 -03:00
David Capello
81b2507bb6 [lua] Add Tileset:tile(tileIndex) API to get tile image/data/properties (fix #3653)
This should replace the old Tileset:getTile(tileIndex) which returns
only the image.
2023-01-06 19:50:04 -03:00
Martín Capello
6534d37b40 Add custom properties serialization/deserialization lua tests 2023-01-06 19:28:02 -03:00
David Capello
d590d3f39a Add nullptr_t to doc::UserData::Variant to fix bug when undoing an previously unexistent property 2023-01-06 14:36:51 -03:00
David Capello
8f09728105 Merge branch 'custom-properties-serialization' (fix #3632, #3645) 2023-01-06 10:03:19 -03:00
Martín Capello
b00b96877a Remove unused include 2023-01-06 10:02:14 -03:00
David Capello
f5bc573bfc Remove base::thread, we use std::thread 2023-01-05 16:43:09 -03:00
David Capello
177f42898a Replace std::stringstream() with fmt::format() 2023-01-05 16:35:24 -03:00
David Capello
a0ddefb732 Remove note about "extension:" prefix in external files chunk 2023-01-05 16:28:47 -03:00
David Capello
eaa0f5e46a Fix unintentionally fall through 2023-01-05 16:22:20 -03:00
David Capello
7ede783926 [lua] Add key modifiers to mouse and touch messages on canvas widget 2023-01-05 16:14:00 -03:00
David Capello
8aa49479b8 [lua] Add Sprite.id and Layer.id properties 2023-01-05 16:01:42 -03:00
Martín Capello
3e55baec1a Update laf submodule 2023-01-05 15:42:02 -03:00
Martín Capello
03d66aa203 Introduce FLOAT and DOUBLE types 2023-01-05 15:30:45 -03:00
Martín Capello
eebc661a56 Add serialization/deserialization tests of sprite's user data properties 2023-01-05 15:17:02 -03:00
Martín Capello
dbeec18ef5 Add operator== to Fixed type to enable Vector comparisons 2023-01-05 15:17:02 -03:00
Martín Capello
db9db191f5 Fix serialization of external files chunk 2023-01-05 15:17:02 -03:00
Martín Capello
03f0c7ff08 Replace use of new with make_unique 2023-01-05 15:17:02 -03:00
Martín Capello
6c886cfa19 Add serialization/deserialization of user data custom properties 2023-01-05 15:16:57 -03:00
David Capello
1ce3e8e392 Take care of not using UI-related stuff on Clipboard class when ENABLE_UI=0 2023-01-05 14:23:15 -03:00
David Capello
7a1d6aef21 Include Clipboard utilities even when ENABLE_UI=0 2023-01-05 14:23:15 -03:00
David Capello
988cba2c2b Add "Copy Path" option when right-clicking a sprite tab 2023-01-05 14:23:15 -03:00
David Capello
fa3bdf853c Add support for sRGB and linear color profile (none) 2023-01-05 14:23:01 -03:00
David Capello
d3aac6a1cd Add support for .qoi file format (fix #3121) 2023-01-05 14:23:01 -03:00
David Capello
2e02bd307e [lua] Add ev.fromUndo=false in Sprite change event (so the event object isn't nil) 2023-01-05 11:23:42 -03:00
David Capello
84765c5052 Add several notes related to macOS 10.9 limitations 2023-01-05 10:21:50 -03:00
David Capello
17825921e0 [lua] Add onkeydown/onkeyup events to canvas widget 2023-01-04 14:40:10 -03:00
Martín Capello
8b4b803a22 Refactor AsepriteExternalFiles usage 2023-01-03 16:59:36 -03:00
Martín Capello
243fbc3fbc Extend User Data Chunk to support custom properties 2023-01-03 16:59:26 -03:00
Martín Capello
9fef25a674 Clarify where the external files chunk is in the file 2023-01-03 13:18:05 -03:00
David Capello
420278d5a4 Merge branch 'lua-api-for-properties' (fix aseprite/api#88) 2023-01-03 11:34:23 -03:00
David Capello
cf776adc9a Minor formatting changes in set_user_data.h 2023-01-03 11:14:52 -03:00
David Capello
645605305f [lua] Add undo information when we modify user data properties 2023-01-03 11:14:19 -03:00
David Capello
e2024c6edd [lua] Add "properties" property to all objects with user data 2023-01-03 09:00:58 -03:00
David Capello
427efef257 [lua] Add possibility to set the whole properties object 2023-01-03 09:00:36 -03:00
David Capello
b9537dbbe0 [lua] Add object.properties("extID") syntax to get extension properties 2023-01-03 08:34:14 -03:00
David Capello
9138592e98 [lua] Add support to set/get tables (arrays/maps) into user properties 2023-01-02 19:51:07 -03:00
David Capello
11dbb22efa [lua] Correctly call PropertiesIterator destructor using its __gc
This was detected by MSVC with its _ITERATOR_DEBUG_LEVEL=2 where
orphan iterators are detected when the map/container is destroyed.
2023-01-02 17:05:08 -03:00
David Capello
9f0491ddb6 [lua] Add support to iterate properties using pairs() 2023-01-02 14:36:49 -03:00
David Capello
ef0596fd01 [lua] Add __len operator to Properties 2023-01-02 12:54:37 -03:00