Commit Graph

138 Commits

Author SHA1 Message Date
Martín Capello 85997a08cf Add slices copy&paste and duplication (fix #4466) 2025-08-27 12:16:35 -03:00
David Capello f61c2c3950 Revert Esc key behavior to drop+deselect (fix #5102)
This adds a new button in the context bar so we have the three
available options to handle a transformation/drop pixels:

* Drop pixels and deselect (Esc key)
* Drop pixels but keep the selection (Enter key), new "Apply" command
* Discard changes/undo (Ctrl+Z)

This adds a new key context (Transformation) and also fixes tooltip
shortcuts on context bar buttons to show the current configured
shortcut for each action.

Reverts debab653fa and 194f8424a8
2025-08-27 11:56:57 -03:00
David Capello 09538f9a1a clang-format all files 2024-12-16 14:52:19 -03:00
sharkboi cd5bf499ea Disable Brush Preview in Preview window by default (fix #4721, #4752) 2024-11-06 15:40:29 -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 11644a7d16 Add Shift+F7 to toggle other layers visibility on Preview window 2023-07-19 10:56:16 -03:00
David Capello 8247d53642 Enable several ShowSomething commands in non-UI environments
This is to allow using ShowGrid in test cases when the UI is not
available (most of these commands only modify the preferences).
2023-03-28 13:42:34 -03:00
David Capello 30a88c8e3d Put playback options into Frame > Playback submenu
This menu was accessible right-clicking the Play button in the
Timeline (and in the Preview window, with specific options for the
Preview).

This change includes some changes:

1. Now if a menu <item> in gui.xml doesn't specify a text field, the
   text of the command is used (to avoid double translation, the bad
   side is that we don't have a mnemonic specified).
2. Menu::showPopup() can be used with submenus from the root menu, to
   do this we have to remove the menu item owner temporarily before we
   show the menu as popup (see the change in Menu::showPopup())
3. We can specify a special active DocView for commands with
   UIContext::SetTargetView, this is used to set the Preview editor as
   active view for commands like TogglePlayOnce, etc.
2023-03-21 17:18:05 -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 683954b8fd Enable DeselectMask and MaskAll commands when ENABLE_UI=off 2022-11-02 10:26:51 -03:00
David Capello a2f61a3378 Add "File > Export > Export Tileset" option (#3240)
Now we can export one (or several) tilesets in one sprite sheet (using
the same options that are available in the Export Sprite Sheet dialog,
e.g. like extruding tiles, related to #1982 in some way).

Some changes:

* New "Source" field and fromTilesets param for ExportSpriteSheet
  command
* New ExportTileset command (which acts like ExportSpriteSheet but
  with fromTilesets=true by default)
* Added --export-tileset CLI option
2022-08-18 14:56:43 -03:00
Martín Capello fcac48cccb Add option to enter Aseprite license key (#2664)
This is an initial version to add an automatic update feature in the
future.
2022-06-28 19:09:10 -03:00
David Capello 46626bb5ce Merge branch 'main' into beta 2022-04-13 23:01:12 -03:00
David Capello b4d3692927 Add ShowMenu command so the user can customize Alt+top level menu mnemonic shortcuts (#3239) 2022-04-12 22:52:09 -03:00
David Capello d077900fe5 Merge branch 'main' into beta 2021-10-13 10:15:39 -03:00
David Capello 212e9fbe6c New initial Lua debugger version (#1967)
Incomplete version of the Lua debugger.
Some available features:

* Break in next executed instruction
* Step in, over, out
* See & navigate stacktrace
* See local variables

Some missing features:

* Breakpoints
* Eval user expressions with local variables

The UX needs some improvement yet.
2021-10-12 16:52:14 -03:00
David Capello 775e8f86be Merge branch 'main' into beta 2021-09-23 09:19:23 -03:00
David Capello 515952cf32 Enable Fill/Stroke commands when !ENABLE_UI 2021-09-23 09:18:14 -03:00
David Capello 8f838ba36d Backport FullscreenMode command (#464)
Original from ae02600a63
2021-07-05 20:11:46 -03:00
Gaspar Capello 3c6320a4b5 Add select used colors and select used tiles on palette options 2021-05-20 15:59:42 -03:00
David Capello a012dac020 Merge branch 'main' into beta 2021-04-12 17:11:28 -03:00
David Capello 2df3cd8a80 [lua] Add app.command.ImportSpriteSheet()
Feature request: https://community.aseprite.org/t/8482
2021-04-09 17:28:59 -03:00
David Capello 44437e0d1f Add new ConvertLayer command ("Layer > Convert To" menu item)
Now we have an easy way to convert between:
  Background <-> Layers <-> Tilemaps

Deprecated (they are kept only for backward compatibility):
  BackgroundFromLayer
  LayerFromBackground
2021-02-23 11:32:08 -03:00
David Capello 8b1f887720 Show tile numbers when moving tilemaps 2020-10-13 18:12:29 -03:00
David Capello 515dace441 Merge branch 'beta' into tilemap-editor 2020-07-13 17:32:42 -03:00
David Capello ae02600a63 Add FullscreenMode command (fix #464) 2020-06-24 21:34:55 -03:00
David Capello bd1723313a Merge branch 'master' into tilemap-editor 2020-06-12 11:33:55 -03:00
MorganDavid 39a2045a43 Added swap checkerboard colors command 2020-05-28 23:11:26 +01:00
David Capello a80af2b304 Merge branch 'master' into tilemap-editor 2020-05-18 20:24:22 -03:00
David Capello fb68407e04 Add support to call Flip command without UI 2020-04-17 12:32:10 -03:00
David Capello 776b7862d3 Add Space+N/Tab/1,2,3 to handle tilemap modes
* Space+N to create new tilemaps
* Space+Tab to switch the tileset visibility
* Space+1,2,3 to change to manual/auto/stack tileset modes
2020-02-17 16:36:18 -03:00
David Capello e792d4e078 Add possibility to move tiles w/drag and drop + remap tiles 2020-02-17 09:06:02 -03:00
David Capello 26139c4ae2 Add tilemap layers (#977)
This is the first commit with a simple tilemap editor. Still buggy but
functional in several ways. Several changes were made:

* NewLayer command can receive a tilemap=true to create a new tilemap
  layer
* New ToggleTilesMode command added to switch between the palette and
  the tileset in the ColorBar (the ColorBar was expanded to show
  colors or tilesets with a generic AbstractPaletteViewAdapter)
* All commands to create new layers were moved to Layer >
  New... submenu
* There are a new tileset chunk to save tilesets in .aseprite files,
  and a new kind of cels to save tilemaps
* Added doc::LayerTilemap, doc::Tileset, etc. and several other types
  to handle tilesets/tilemaps in the doc layer.
* Added doc::Grid class with grid specifications that indicates how a
  tilemap <-> tileset must be drawn
* Added and expanded cel operations to work with tilemaps and
  conversions between regular LayerImage cels <-> LayerTilemap cels
  (e.g. copy cels in the timeline between layer types)
2020-02-17 09:06:00 -03:00
David Capello b7f41b811a Add Screenshot command 2019-12-05 12:05:18 -03:00
David Capello 5e25d5a021 [lua] Add support to call AddColor from scripts 2019-10-01 09:37:04 -03:00
David Capello f317f9594d Add support to use ColorQuantization from scripts 2019-08-12 16:42:30 -03:00
David Capello 35aaa18ee3 [lua] Add app.range.colors + Move/CopyColors commands
Closes: https://community.aseprite.org/t/2512
2019-08-10 14:37:18 -03:00
David Capello 4c4c20ace6 [lua] Add support to use ColorCurve/ConvolutionMatrix commands from scripts 2019-07-25 22:23:38 -03:00
David Capello 1ef67cada4 lua: Support more filters from scripts (BrightnessContrast, Despeckle, HueSaturation, InvertColor, Outline) 2019-07-18 11:47:26 -03:00
David Capello 814250e325 Add support to call ReplaceColor from scripts when the UI is disabled (e.g. from CLI) 2019-07-16 16:36:09 -03:00
David Capello fe4106457f Add "Edit > Paste Special > Paste As New Sprite" option (fix #1024) 2019-06-28 18:51:14 -03:00
David Capello 54883012bb Put "Reopen Closed File" and "Clear Recent Files" options inside "File > Open Recent" menu 2019-05-27 23:53:57 -03:00
David Capello cdb98d4cd5 Add File > Reopen Closed File command 2019-05-27 23:53:57 -03:00
David Capello 17895dce69 Support MergeDownLayer when ENABLE_UI is not defined 2019-04-17 00:16:52 -03:00
David Capello 9cf408541f Add Edit > FXs > Outline command (fix #371, #1198) 2019-03-11 15:35:22 -03:00
David Capello 4335f0c728 Add CommandWithNewParams to load command parameters from Lua tables directly
With these new classes (Param/NewParams/CommandWithNewParams(Base)) we
can load parameters for commands from a Lua table directly without
converting to a string. So instead of

   Lua value -> string -> C++ param type

We can do

   Lua value -> C++ param type

directly.
2019-01-07 16:42:55 -03:00
David Capello 496d15c428 Add CanvasSize support for non-UI 2019-01-06 19:12:04 -03:00
David Capello 569b923e2f Move PaletteSize to the non-UI list of commands 2019-01-06 18:46:00 -03:00
David Capello 17496c8630 Support NewFrame when ENABLE_UI is not defined 2018-10-31 17:36:22 -03:00
David Capello 967c819a18 Add GotoFirst/LastFrameInTag commands 2018-10-26 10:29:42 -03:00