Commit Graph

16 Commits

Author SHA1 Message Date
Christian Kaiser 229a3cdf65 [lua] Add onchecked parameter to Commands 2025-08-07 18:57:28 -03:00
Christian Kaiser eaa2bdf0af [lua] Process mnemonics consistently for plugins (fix #5250) 2025-08-04 15:58:29 -03:00
Christian Kaiser 3fbfc525d1 Use Version object for .version 2025-01-07 11:34:42 -03:00
Christian Kaiser 38bfd465ef Add .version and .displayName to Lua Plugin table 2025-01-07 11:19:21 -03:00
David Capello 09538f9a1a clang-format all files 2024-12-16 14:52:19 -03:00
David Capello bf0a47545c Remove #if/endif ENABLE_UI conditional directives (fix #4619)
This was originated for #1279 (CLI-only Aseprite) which can be
achieved with LAF_BACKEND=none anyway.

In this way we simplify the development process, and checking for the
availability of the GUI can be done in run-time through App::isGui()
or Context::isUIAvailable().
2024-09-02 23:16:26 -03:00
David Capello 1c6e583c87 [lua] Add require() function (fix aseprite/api#10)
This is the first attempt to finally implement the require() function
on Lua. The main problem was how to solve conflicts between plugins
that use the same library name. Here we separate each plugin like in a
namespace, so require(name) inside a plugin will save the module in
_LOADED["pluginName/libraryName"] to avoid conflicts with other
libraryName from other plugins.
2023-04-18 19:41:01 -03:00
David Capello d2fc1ae7b8 [lua] Add Plugin:newMenuSeparator() function 2023-03-20 18:25:21 -03:00
David Capello 23557a190b [lua] Add Plugin:newMenuGroup() to add submenus (fix #3731) 2023-03-09 16:41:37 -03:00
David Capello a39e235b23 Don't store a Command* pointer in AppMenuItem (fix #3359, fix #3360)
Instead of storing a Command* we can store the command ID, which it's
less problematic in extreme cases where the Command that is being
referenced is deleted or recreated, i.e. when a plugin is
disabled/re-enabled.
2022-06-07 14:47:40 -03:00
David Capello 1e92f66ff2 Remove trailing whitespace 2021-09-30 14:22:21 -03:00
lampysprites 449c158f80 Implement enabledness check for script commands 2021-09-28 14:44:38 +07:00
David Capello 2af6a0493e Fix recent list of files menu
This is a problem introduced with the plugin groups, but now we use a
group to store the list of recent files. With this commit we fixed
some bugs in the impl of menu groups.
2020-04-08 17:50:17 -03:00
David Capello 482fcd3b8c Fix crash when loading plugins from CLI and compilation when !ENABLE_UI 2020-04-07 10:56:48 -03:00
David Capello 298c2e24e8 Add possibility to put plugin:newCommand{} in specific menu locations identified as "groups" (#1949) 2020-04-02 23:18:08 -03:00
David Capello 6b6b9057bf Add support for scripts on extensions (#1949)
It still need some work to associate the command to menus easily.

Related issues:
  https://github.com/aseprite/aseprite/issues/1403
  https://github.com/aseprite/aseprite/issues/1949
  https://github.com/aseprite/api/issues/20
  https://community.aseprite.org/t/lua-script-extension-and-menu-api/5085
2020-04-02 20:21:21 -03:00