Commit Graph

7668 Commits

Author SHA1 Message Date
Gaspar Capello
1193bf18fc Fix lua error crash (fix #2635)
Prevents crashes from uncaught exceptions generated from Lua errors
when running aseprite from the console with -script param.
2021-03-09 16:40:24 -03:00
David Capello
2dccb6d646 Add GitHub actions 2021-03-08 11:38:04 -03:00
David Capello
246b52b086 Update laf module 2021-03-08 11:16:57 -03:00
David Capello
35bb3af6e2 Replace all base::Bind() with lambda functions 2021-03-05 20:09:42 -03:00
David Capello
ddbbf12bfc Update main branch 2021-03-05 18:39:36 -03:00
David Capello
e50ea46c91 Minor change in CMakeLists.txt 2021-03-05 18:27:31 -03:00
David Capello
9189b8b9dc Fix indentation 2021-03-03 10:49:04 -03:00
David Capello
777a0f132a Don't send paint messages when we are closing the app 2021-03-03 09:54:20 -03:00
David Capello
d7e154b726 Update laf module 2021-03-02 14:29:30 -03:00
David Capello
8034b0cbcc Add support for multiple native windows (#139, #250, #962, etc.)
Each ui::Window now can have a related native os::Window. This
connection is done through the ui::Display class added recently in
c3d52f0bbe.
2021-03-02 13:50:49 -03:00
David Capello
74961f58c0 Missing std::cout -> TRACEARGS from b163b7be48 2021-03-02 12:26:42 -03:00
David Capello
f70e8d3ae7 Add ui::expandWindow() to change the size of a window dynamically 2021-03-02 08:44:35 -03:00
David Capello
b163b7be48 Simplify REPORT_EVENTS code in ui::Manager 2021-02-26 14:08:40 -03:00
David Capello
4a17ab7ef4 Merge branch 'master' into beta 2021-02-26 09:29:50 -03:00
David Capello
5d6aa3ff11 [win] Fix leak of GDI objects (HRGNs) 2021-02-26 09:26:38 -03:00
David Capello
4c9c35bdfd Update laf module 2021-02-25 17:17:29 -03:00
David Capello
49d5787737 Merge branch 'master' into beta 2021-02-25 17:12:53 -03:00
David Capello
ef4f691459 Generate a native cursor for the crosshair on the sprite
In this way we can get pixel from the window surface and put pixels in
the new cursor surface which will represent the crosshair on the
mouse/screen position. In this way we avoid an effect of a slow mouse
response on high refresh rates.

Maybe related to: https://community.aseprite.org/t/3354
2021-02-25 16:56:33 -03:00
David Capello
a24f271e3a Remove unused vars from BrushPreview 2021-02-25 14:44:07 -03:00
David Capello
74ee4dced4 Fix DEBUG_PAINT_EVENTS on Windows 2021-02-25 13:14:39 -03:00
David Capello
a28b8ad5f8 Update laf module to improve Windows performance 2021-02-25 12:51:27 -03:00
David Capello
9dedb41e0f Fix compilation when ENABLE_DEVMODE is defined 2021-02-24 09:26:24 -03:00
David Capello
ddcc53469d Add possibility to pick colors from the desktop (fix #594)
Requested several times (e.g. https://community.aseprite.org/t/2431)

Added support only for Windows and macOS at the moment.
2021-02-23 18:25:28 -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
b6987a0262 New "Layer > Convert" submenu
This will be a place to put new options to convert images to tilemaps
and viceversa.
2021-02-22 16:50:31 -03:00
David Capello
7e732b3223 Don't use cmd::TrimCel() on tiles when manual mode is enabled
Applied the fix from e1402381a8 to all
places where cmd::TrimCel() is used.
2021-02-22 16:39:40 -03:00
David Capello
e83ed244b8 Fix bug loading the correct mask color for tilesets 2021-02-22 16:21:18 -03:00
Gaspar Capello
e1402381a8 Fix undo when working on tilemap layer in tilemap mode Pixels and tileset mode Manual.
Before this fix working the next context:
- Active layer is a tilemap layer.
- TilemapMode == Pixels.
- TilesetMode == Manual.
- At least a border of the tilemap cel bounds is made of noTiles and tiles with index ’X’ (or a border is made all of tile ‘X’).
- With the marquee tool select a rectangle which matchs or exceeds the bounds of tile ‘X’.
Then when you delete the selected pixels (with the ‘delete’ key), automatically Trim command was executed, and the trimmed border is lost in the undo information.

Now, we skip the trim command in the context:
- Active layer is a tilemap layer.
- TilemapMode == Pixels.
- TilesetMode == Manual.
2021-02-18 12:52:49 -03:00
David Capello
c3d52f0bbe Add ui::Display to support multiple windows in the future
This ui::Display is related to one native os::Window, so the dirty
region/invalid region is now part of a ui::Display instead of a
ui::Manager.

* Replaced ui::display_w/h() functions with ui::Display::size()
  and ui::get_desktop_size()
* The ui::Manager contains the main ui::Display, and in the future an
  ui::Window will have its own ui::Display
2021-02-18 12:34:42 -03:00
Gaspar Capello
715600679d Fix old render engine issue in tilemap layers
Before this fix, first row of pixels (or/and columns) of a tile were not rendered when a scroll down or/and right take place and the zoom was enough to get an image size that exceeds the editor window.
The issue can be reproduced:
- Make a tilemap layer.
- Put tiles on that layer.
- Zoom in until image size exceeds the editor window (and pan the image until hiding two tiles).
- Scroll down (or/and right) to show the hidden tiles.
Then, first pixel rows (or/and columns) of ex-hidden tiles won't be rendered.
2021-02-02 16:57:48 -03:00
David Capello
06a5b4f3ae Convert os::NativeCursor into a enum class 2021-02-02 16:52:47 -03:00
David Capello
5d31314cdb Adapt code to the new os::Display -> os::Window refactor 2021-02-02 15:59:28 -03:00
David Capello
017a7320f9 Process the new CloseApp event from laf 2021-02-01 12:09:53 -03:00
Gaspar Capello
a1e013f4a7 Fix rotSprite for normal layers (and keep the tile replication Ok on tilemap layers during a "transform action") 2021-01-30 11:18:40 -03:00
David Capello
289a6ab864 Merge branch 'master' into beta 2021-01-29 12:19:43 -03:00
Gaspar Capello
30a1f33ef6 Fix tilemap layer cels don’t move through frames movement action
Before this fix, tilemap layer cels don’t move when the user drag a column of cels through a frames movement action.
2021-01-21 16:08:59 -03:00
Gaspar Capello
3035a5713d Fix crash deleting a group layer at the top level
The crash could be achieved by having just one group layer at the top
level (with some children) and trying to delete it using Layer >
Delete Layer menu option (without using the timeline range).

Report: https://igarastudio.zendesk.com/agent/tickets/1719
2021-01-15 17:02:10 -03:00
David Capello
32106512dc Update about/status bar copyright info 2021-01-15 14:46:45 -03:00
David Capello
b1b201a22c Minor change in ui::Widget to check current manager 2021-01-15 13:16:40 -03:00
Gaspar Capello
61e469d126 Fix tag/slice properties: focus name by default instead of user data 2021-01-15 13:02:17 -03:00
David Capello
045e3ad473 Restore location of ColorQuantization option in the palette menu
Just to avoid confusion right now and to avoid deprecating
documentation in a minor release.
2021-01-15 12:23:10 -03:00
Gaspar Capello
980454eac0 Fix brush symmetry
Prior to this fix, asymmetric brushes weren't reflected, instead the brush was simply moved to a mirrored position.
2021-01-15 12:15:16 -03:00
David Capello
2be11cf2f5 Fix ASSERT deleting a backup session on start when there is no UI
This can happen if the session folder cannto be deleted e.g. when the
folder is not empty (for example if we've copied/created a file in the
session folder manually).
2021-01-15 11:43:07 -03:00
David Capello
a3072fba41 Revert change in Console::showException() from d0b39ebade 2021-01-15 11:33:40 -03:00
David Capello
ffbe4863ca Minor fix in coding style guide 2021-01-14 12:45:32 -03:00
David Capello
d0b39ebade Redraw window immediately on "live resizing" 2021-01-12 21:39:12 -03:00
David Capello
090743155b Merge branch 'css-export' 2021-01-05 15:03:09 -03:00
David Capello
ee07df6a26 CSS output without vars by default 2021-01-05 15:02:12 -03:00
David Capello
b1016a419f Minor formatting changes 2021-01-05 14:43:43 -03:00
David Capello
e813773445 Merge branch 'feature-css-export' into css-export 2021-01-05 12:23:57 -03:00