Commit Graph

13 Commits

Author SHA1 Message Date
David Capello c9b330ab65 lua: Added Dialog:shades{} widget
Also ColorShades is a little more generic now (doesn't depends so much
on the ColorBar).
2019-12-16 21:17:12 -03:00
David Capello 2b1903ee02 lua: Add Dialog{ title, onclose } constructor 2019-12-13 10:23:22 -03:00
David Capello 484de6bd3a lua: Fix memory leak of dialogs with callbacks pointing to itself
Now we store the callbacks in a table that depends of the lifetime of
the dialog (instead of the global registry), so when the dialog is not
used anymore/closed, the whole "island" of objects (dialog +
callbacks) is GC'd.
2019-12-12 09:13:21 -03:00
David Capello ad1a39714e [lua] Add Image:resize() function
Closes: https://community.aseprite.org/t/3633
2019-08-13 18:16:30 -03:00
David Capello 6c7f1ff05b lua: Add "bounds" parameter to Dialog:show() function 2019-07-12 16:44:54 -03:00
David Capello 568aadbfc8 lua: invalidate Dialog() after changing its bounds 2019-07-12 16:42:43 -03:00
David Capello e0e83f0d40 Add Dialog:file() (#1997, fix aseprite/api#7) 2019-02-13 16:15:04 -03:00
David Capello 74b2423070 lua: Add "focus" property for Dialog widgets (mainly button and entry) 2019-01-10 16:20:11 -03:00
David Capello 4fb260d265 lua: Add Dialog.bounds property 2018-11-29 09:46:37 -03:00
David Capello f7a07b5a09 lua: Call Dialog button onclick callback with protected lua_pcall() 2018-11-21 17:42:12 -03:00
David Capello 7029e05dc4 lua: Avoid crashes executing transactions without an active sprite
This is true even for background Dialogs with buttons that will
try to create a transaction for a nil app.activeSprite.

With this change we introduced a new way to handle the app::Console window,
it'll be alive almost the entire execution of the program (so if we
close it, it's hidden, but then will appear in the same location if
it's open again, and the text is cleared).
2018-11-20 19:42:53 -03:00
David Capello 254a866b9f Fix compilation when ENABLE_UI is not defined 2018-10-26 08:50:13 -03:00
David Capello bccd3f1bf8 lua: add Dialog() 2018-10-11 12:01:21 -03:00