Commit Graph

7603 Commits

Author SHA1 Message Date
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
David Capello
d4072fac94 Merge branch 'save-palette-as-preset' 2021-01-05 11:48:57 -03:00
David Capello
d3f3858859 Minor change "save_as_preset" -> "saveAsPreset"
This new camelCase style is prefered since the introduction of the Lua
scripting API.
2021-01-05 11:41:26 -03:00
David Capello
de22d69678 Add FinishLoading signal to ResourcesListBox to detect when the resources were loaded
In this way we avoid using ui::ListBox::Change signal as a
workaround (which is a signal that should be fired only from
ui::ListBox::onChange()).
2021-01-05 11:03:29 -03:00
mezz
78fc63c3f8
Organize the palette load/save menu 2021-01-04 09:53:20 -10:00
mezz
3211831da3
Create and use new signal: PalettePresetsChange 2021-01-04 09:53:20 -10:00
David Capello
4b1e4c67c5 Merge branch 'fix-2564' 2021-01-04 15:55:50 -03:00
David Capello
23559a9b44 Don't generate new slice keyframes when duplicating the sprite (duplicate only the slice keyframes)
Related to #2568
2021-01-04 15:52:56 -03:00
Gaspar Capello
a7419c7813 Fix pen pressure size + symmetry
This fix improves the symmetry drawing when symmetry and the pen pressure size are on.
2020-12-30 16:35:36 -03:00
David Capello
4ae6d12fe0 Regenerate tag bands after resizing a tag 2020-12-30 10:58:16 -03:00
David Capello
96a1c98dfe Add missing #include to use Strings 2020-12-30 10:58:05 -03:00
David Capello
ed8ef5dbd7 Add support to resize tags with drag & drop
This idea was originally planned but never implemented. Requested
several times after tags were introduced:

https://github.com/aseprite/aseprite/issues/1275
https://github.com/aseprite/aseprite/issues/1875
https://community.aseprite.org/t/drag-to-resize-tag/3619
2020-12-30 10:25:37 -03:00
mezz
be48c40dc5
Reload palette popup and refresh search results when saving a new preset 2020-12-29 20:45:37 -10:00
mezz
98a0bcb2d7
Add palette option to save as preset
This works the same as saving a palette normally, but opens the file dialogue to the default palette preset directory.
2020-12-29 19:56:02 -10:00
David Capello
91628daa9d Merge branch 'master' into beta 2020-12-22 15:48:15 -03:00
Gaspar Capello
5d70ba46a3 Add documentation about Sprite User Data 2020-12-17 10:42:32 -03:00