Commit Graph

112 Commits

Author SHA1 Message Date
David Capello d164458c24 Show selected fg/bg items in the tiles view 2021-05-23 15:28:39 -03:00
David Capello 95a44f5d68 Focus palette or tiles view when we select a set of colors/tiles
E.g. with this we can selected unused colors and then press Delete key
to remove those colors.
2021-05-20 18:03:07 -03:00
David Capello 19d7566249 Fix bug where F5 was resetting the color bar box size/zoom 2021-04-30 11:31:02 -03:00
David Capello c2e5e69882 Simplify tilesets impl using tile index 0 = an empty tile
In this way we always have an empty tile available in the drawing
process. We've also added the Tileset::firstVisibleIndex field to
change the visible index of the tile 1 so we can offset the visible
number by the user (just as a visual aid / simulate old tilesets with
index=0=non-empty tile).
2020-10-30 16:33:34 -03:00
David Capello 3e55928d41 Fix crash clicking in the PaletteView area with an empty tileset 2020-10-23 16:07:54 -03:00
David Capello edebb57f66 Refactor clipboard code
* Moved all clipboard:: functions inside app::Clipboard class
* Convert app:📋:ClipboardFormat enum to
  app::ClipboardFormat enum class
* Added app::Context::clipboard()
2020-09-25 11:14:52 -03:00
David Capello 5ee3ebdd71 Add fg/bg tiles selectors in ColorBar
Now fg/bg colors and fg/bg tiles are different widgets, and the
StatusBar can show tiles when the eyedropper is picking tiles.
2020-08-21 18:28:31 -03:00
David Capello 515dace441 Merge branch 'beta' into tilemap-editor 2020-07-13 17:32:42 -03:00
David Capello db4504e816 Refactor laf-os memory handling 2020-07-07 19:06:48 -03:00
David Capello 8a3f32b47f Replace all base::Bind() with lambda functions 2020-07-03 21:51:46 -03:00
David Capello bd1723313a Merge branch 'master' into tilemap-editor 2020-06-12 11:33:55 -03:00
David Capello a80af2b304 Merge branch 'master' into tilemap-editor 2020-05-18 20:24:22 -03:00
David Capello 46f4002368 Fix crashes saving sprites with '%' char in their filename
To fix this we changed the way StatusBar text is handled (we are using
fmt::format() in StatusBar instead of printf-like ... args now).
2020-05-08 17:39:55 -03:00
David Capello b628e21e76 Replace MIN/MAX() macros with std::min/max() functions 2020-04-08 12:20:53 -03:00
David Capello 86259a64fc Replace MID() macro with base::clamp() function
In the future we will replace base::clamp() with std::clamp().
2020-04-07 19:47:16 -03:00
David Capello 09ea577a08 Match ui::MouseButton values to os::Event::MouseButton 2020-03-27 15:40:43 -03:00
David Capello 9973258618 Fix bug moving tiles out of the tileset range 2020-02-18 10:30:34 -03:00
David Capello 000e22f4d5 Fix invalid entries selected after resizing tileset 2020-02-17 09:06:02 -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 92b794d457 Add the final TilesetModes UI: Manual/Semi/Auto 2020-02-17 09:06:01 -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 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 8062c81018 Remove unused variable 2019-03-21 17:07:59 -03:00
David Capello 9461e609e2 Add dimension and color in theme.xml to customize palette view separators 2019-03-21 16:58:50 -03:00
David Capello 4919740861 Add option to disable the separator between palette entries 2019-03-20 14:27:19 -03:00
Gaspar Capello b3771472c3 Add default info on status bar (fix #1874) 2018-11-14 18:04:26 -03:00
David Capello a4d8fc52bf Manage color profiles (fix #1576) 2018-10-19 15:30:30 -03:00
David Capello 5cb2d984f0 Rename she -> os 2018-08-09 12:58:43 -03:00
Gaspar Capello 9dcadcf283 Fix calculation last drawable layer and last drawable frame 2018-08-03 11:10:43 -03:00
Gaspar Capello 5e86884f74 Color palette does not scroll (fix #1796) 2018-08-02 15:50:35 -03:00
David Capello c388f1d812 Fix issues updating status bar in special cases when status bar indicators layout do not change 2018-07-05 12:39:49 -03:00
David Capello 7250e6adc4 Fix destination index in status bar text when moving palette colors 2018-07-05 11:29:12 -03:00
David Capello 7f2082e89c Show palette entry info in status bar correctly when there are selected colors (fix #1777) 2018-07-05 11:02:07 -03:00
David Capello 05f6aec8b2 Add ability to select timeline + color bar at the same time (related to #1741) 2018-06-05 13:11:29 -03:00
David Capello 27f0182bdb Fix redrawing PaletteView when dragging colors (fix #1616)
Regression introduced in 86c8bc57a5
2017-11-17 11:26:40 -03:00
David Capello 86c8bc57a5 Avoid redrawing the whole PaletteView when we move the mouse between color entries 2017-11-03 10:02:11 -03:00
David Capello 432eedcb97 Support changing theme and UI scaling w/o restart (fix #471) 2017-08-15 10:39:06 -03:00
David Capello 29a49ad7fa Add HSL color selection (related to #707) 2017-05-29 14:20:42 -03:00
David Capello cc7bde6cd1 Fix some compiler warnings (implicit casts & unused vars) 2017-04-19 19:26:23 -03:00
David Capello 5888db011c Avoid assert fail when resizing palette 2017-04-10 18:03:00 -03:00
David Capello 37748c3783 Add automatic cel guides when Ctrl/Cmd is pressed 2017-03-23 00:57:21 -03:00
David Capello bc4f8ad3e1 Rename newStyles -> styles 2017-03-13 22:31:57 -03:00
David Capello be3c9c1bcc Convert timeline widget to new styles
And remove the old skin::Style.
2017-03-13 18:13:38 -03:00
David Capello 47f3d540b7 Fix drawing UI text with TrueType fonts (related to #124) 2017-02-06 17:58:55 -03:00
David Capello b2a25954d4 Add smooth scroll w/macOS trackpad to more widgets 2016-11-22 09:25:23 -03:00
David Capello 268cfa3a46 Add support for pinch gesture on palette view 2016-11-14 16:12:11 -03:00
David Capello 5ecc356a41 Replace GPL license with the new EULA 2016-08-29 13:08:21 -03:00
David Capello 97ebd70048 Update the status bar depending on the Editor text when the tool changes
It fixes a problem were PaletteView was clearing the StatusBar set by
the Editor when a quicktool keyboard shortcut was pressed.
2016-04-25 16:17:30 -03:00
David Capello 07b67a66f7 Add app::IColorSource interface to get pixels from widgets from mouse pos
This is consumed by ColorButton which can be dragged to use a eyedropper
in different widgets.
2016-03-17 17:16:35 -03:00
David Capello c09dfa89f0 Show grayscale colors in color buttons when we're editing a grayscale image 2016-02-24 19:37:20 -03:00