Commit Graph

8965 Commits

Author SHA1 Message Date
David Capello
c7864c9fac Avoid MSVC issue converting implicitly a string literal (const char*) to bool when assigning to a variant<bool, string, ...>
More information:
https://twitter.com/davidcapello/status/1609918634075226121
https://developercommunity.visualstudio.com/t/10242620
2023-01-02 12:42:22 -03:00
Martín Capello
3167f8836c Add custom properties types constants 2022-12-30 17:23:31 -03:00
David Capello
dc0e57728a Minor changes to improve the UserData::Variant/Properties API
Mainly added ways to forward operator= and the default copy
constructor to the std::variant so we don't have to assign values
creating new Variant{}s.
2022-12-30 14:01:07 -03:00
David Capello
1830e5343f [lua] Add onwheel and ontouchmagnify events to Dialog:canvas() 2022-12-29 15:12:15 -03:00
Martín Capello
95a195b99b Fix how string properties are set to avoid tests failures in windows 2022-12-28 13:51:53 -03:00
Martín Capello
49ae010c7a Add UserData tests 2022-12-28 11:40:23 -03:00
David Capello
28c26aa62c [lua] Add ev.tileset value to remaptileset event 2022-12-27 15:54:41 -03:00
David Capello
c8d4c60f07 [osx] Fix error using std::any_cast() without a pointer as argument (not available in macOS 10.9) 2022-12-27 15:53:41 -03:00
Martín Capello
8568390306 Add a map of custom properties to be used by extensions (#3631) 2022-12-27 14:24:48 -03:00
David Capello
25a4e67aaa [lua] Add remaptileset event for sprites 2022-12-27 14:11:05 -03:00
David Capello
d683aaf437 [lua] Rename MouseCursor.HIDDEN -> MouseCursor.NONE 2022-12-26 18:31:37 -03:00
David Capello
8447a097c6 [lua] Add Image.id and Image.version getters 2022-12-26 17:20:27 -03:00
David Capello
a6a7519178 [lua] Add possibility to modify the mouseCursor of a canvas 2022-12-26 15:33:14 -03:00
David Capello
ae6f9c22ba Add support to save multiple files with -save-as {title} etc.
Fixes #2442, fixes #3629, and https://community.aseprite.org/t/16491
2022-12-23 12:09:05 -03:00
David Capello
5309991d0d Remove CliOpenFile argument from CliDelegate::loadPalette()
It wasn't used.
2022-12-23 12:07:04 -03:00
David Capello
768773bb3a Add test for -save-as {title} (#2442) 2022-12-23 11:33:28 -03:00
anGie44
4dc579c386 Update save-as option to use format elements (#2442) 2022-12-23 11:30:49 -03:00
David Capello
822a309724 Several fixes/rewording for --tagnames-format CLI and GUI 2022-12-23 09:59:01 -03:00
David Capello
658a583c7b Assign default/restore tagname format in Export Sprite Sheet UI 2022-12-23 09:53:04 -03:00
David Capello
0da73516f1 New test for --tagname-format CLI argument (#1514, #3271, #3611) 2022-12-23 09:50:54 -03:00
Nathan Pannell
bc9e201255 Added cli option --tagname-format 2022-12-23 09:11:58 -03:00
David Capello
8eacee4c98 [lua] Dialog:canvas() will capture the mouse on mousedown/up by default 2022-12-21 19:09:34 -03:00
David Capello
cdab75beed [lua] Add GraphicsContext:drawImage(image, srcRect, dstRect) 2022-12-21 19:08:46 -03:00
David Capello
f23adb0b1a [lua] Add GraphicsContext:clip()/rect()/roundedRect() functions 2022-12-21 19:07:43 -03:00
David Capello
909ebd6dcb [lua] New Rectangle(point, size) constructor 2022-12-21 13:01:03 -03:00
David Capello
4d880bd5b7 [lua] Add Rectangle.origin and Rectangle.size properties 2022-12-20 18:04:51 -03:00
David Capello
f50bbff5d4 Minor formatting in rectangle.lua tests 2022-12-20 17:52:16 -03:00
David Capello
107585d459 Ignore all generated files when we run CLI tests 2022-12-19 17:23:01 -03:00
David Capello
39109793a9 [lua] Add GraphicsContext:drawImage(img, x, y, w, h, dx, dy, dw, dh) 2022-12-19 16:39:59 -03:00
David Capello
914e14377c [lua] Add Image.bounds and Image:shrinkBounds() 2022-12-19 12:27:30 -03:00
David Capello
810aefaeab Add TODO note to improve shrink_bounds_templ() performance 2022-12-19 12:26:41 -03:00
Gaspar Capello
6d6dfb96a9 Add user data to tiles (fix #3626)
Co-authored-by: David Capello <david@igara.com>
2022-12-17 14:13:49 -03:00
David Capello
ea17eae524 Fix several bugs copying name/userData when we clone tilesets
Found on #3630

Co-authored-by: Gaspar Capello <gaspar@igara.com>
2022-12-17 13:42:51 -03:00
David Capello
5a5ac179cd Merge branch 'canvas' (fix aseprite/api#87) 2022-12-16 11:28:18 -03:00
David Capello
3d9021d717 [lua] Add app.theme.dimension/color.id to access theme values 2022-12-16 10:55:11 -03:00
David Capello
a98f81288d [lua] Add GraphicsContext:drawThemeImage/Rect() functions
Maybe not the best API, but the simplest, in the future we could cache
the part using its ID with something like: app.theme.parts.part_id
2022-12-15 19:41:13 -03:00
David Capello
d4cefb8ba6 Fix crash double clicking a Dialog:canvas()
There were missing some setRecipient() when some messages are
converted to other kind of message (e.g. DoubleClick -> MouseDown)
2022-12-15 19:29:28 -03:00
David Capello
789e857d98 [lua] Add path functions to GraphicsContext object 2022-12-15 16:22:22 -03:00
David Capello
8b390d56fd [lua] Fix mouse position to client coordinates on mouse events 2022-12-15 16:21:24 -03:00
David Capello
b42a8b7ecf [lua] Add fillText() and measureText() functions to GraphicsContext 2022-12-15 10:01:13 -03:00
David Capello
0aaa9fdddf [lua] Add onmousemove/down/up events to canvas widget
At the moment very basic properties were added to the received event:
x, y, and button.
2022-12-14 22:13:49 -03:00
David Capello
25682a44d8 [lua] Add Dialog:repaint() function 2022-12-14 21:17:51 -03:00
David Capello
2cb526a19b [lua] Add new GraphicsContext type for Canvas onpaint event
We include a simple initial API for the GraphicsContext (like
stroking/filling rectangles and images).
2022-12-14 18:59:44 -03:00
David Capello
6e13e59aff [lua] Add initial version Dialog:canvas() (aseprite/api#87)
Right now it just creates a plain widget, but now we can specify
hexpand/vexpand arguments too so we can create a canvas with a fixed
size or with dynamic size (e.g. to use the whole dialog client area).

The onpaint event is not functional yet.
2022-12-14 17:33:29 -03:00
David Capello
3c77928a6f Prefer native file dialog by default (Windows & macOS mainly, #3615)
The native dialog for the Linux version is not yet ready.
2022-12-12 16:48:01 -03:00
David Capello
c25649d865 [osx] Fix shortcuts for Edit actions when a native file dialog is displayed
Fixes #2719, related to #3615
2022-12-09 13:55:44 -03:00
David Capello
c68fcb7da5 Include latest changes of laf module 2022-12-09 11:48:36 -03:00
David Capello
3a8596d02b [osx] Add QuickLook plugin to generate thumbnails and previews (#834, #3615) 2022-12-08 12:05:17 -03:00
David Capello
6bef687401 Update laf module 2022-12-05 11:32:44 -03:00
David Capello
63a9aa67c9 Fix GitHub Actions for new windows-2022 image (20221120.1) w/cmake 3.25.0 (fix #3610) 2022-12-02 12:06:14 -03:00