72 Commits

Author SHA1 Message Date
David Capello
e149f76934 [lua] Add Range.layers/frames setters and Range:clear() 2020-04-16 19:19:18 -03:00
David Capello
28969d968c Finally removing a problematic assert from ~UIContext() 2020-02-05 12:23:11 -03:00
David Capello
8139b8a1d4 Move Preferences instance to app::Context
With this change we fix some tests when !ENABLE_UI and we start using
less Preferences::instance() (maybe in the future we could exclusively
access the preferences from the new Context::preferences() function).
2019-12-11 12:27:56 -03:00
David Capello
fa013f4b63 Preferences can be used in non-UI contexts
Fixed bug running app_preferences.lua from tests repository.
2019-12-10 19:10:47 -03:00
David Capello
536a4c5d3a Simplify Export Sprite Sheet with preview + changes to the UI
These changes include an option to split layers and tags
by rows (fix #1118)
2019-10-18 17:00:35 -03:00
David Capello
944634542e Refresh screen/current palette automatically on Transaction::commit() (#378)
Removed app_update_current_palette() with this patch.
2019-10-01 09:24:03 -03:00
David Capello
42b1154c25 Remove unused variable 2019-09-05 17:56:41 -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
4264f199cd Create the ContextWriter+Tx from UI thread on filters (related to #2122)
When we create a Tx the active site is queried, and the UIContext
needs access to the UI to calculate the active site correctly.
2019-07-29 12:13:53 -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
c7d1e4a472 New option to configure how much time we keep a closed sprite on RAM 2019-06-07 13:17:21 -03:00
David Capello
cdb98d4cd5 Add File > Reopen Closed File command 2019-05-27 23:53:57 -03:00
David Capello
ebca165b2a Add support to modify activeFrame/Layer from scripts without UI 2019-04-13 16:25:21 -03:00
David Capello
104b68555e Fix crash using UIContext::getAllEditorsIncludingPreview() on ToolLoopBase::limitDirtyAreaToViewport() when a two points controller is used on app.toolStroke() on batch mode 2019-03-18 22:32:50 -03:00
David Capello
e0caca3567 Fix crash when Aseprite is being closed 2018-08-16 12:27:41 -03:00
David Capello
3c8220aa7d Show real-time filter preview in all editors
Fix: https://community.aseprite.org/t/1649
2018-07-23 23:43:31 -03:00
David Capello
b3c89cd110 Rename DocumentView -> DocView 2018-07-14 23:24:49 -03:00
David Capello
9c79ea2b77 Rename app::Document -> Doc 2018-07-07 11:54:44 -03:00
David Capello
d00fc99138 Rename DocumentRange -> DocRange 2018-07-07 10:07:21 -03:00
David Capello
457a9999b5 Move doc::Context to app::Context (#378)
We've moved everything related to Context/active site/observable
documents from "doc" namespace to "app" namespace.
2018-07-07 02:47:42 -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
139c5aac49 Add flag to compile CLI-only (fix #1279)
New cmake flag -DENABLE_UI=OFF can be used to turn off the GUI
and compile a CLI-only version of Aseprite.

Requested here too:
https://community.aseprite.org/t/1351
2018-05-07 00:11:50 -03:00
David Capello
60ce295870 Move timeline code to app/ui/timeline/ folder 2017-03-26 13:33:12 -03:00
David Capello
1404b0ce7d Merge branch 'master' into beta 2016-09-16 16:02:26 -03:00
David Capello
6377b550e3 Replace base::Signal/Observable* with obs::signal/observable
We can use the obs library directly for signal/slots and observable
objects.
2016-09-13 15:02:00 -03:00
David Capello
20b726f73b Merge branch 'master' into beta 2016-08-31 19:53:52 -03:00
David Capello
5ecc356a41 Replace GPL license with the new EULA 2016-08-29 13:08:21 -03:00
David Capello
e35a26fdeb Replace access to the first sprite layer with Sprite::root()->firstLayer() 2016-08-11 20:51:14 -03:00
David Capello
147588ff6f Identify different Timeline areas with Site::Focus 2016-06-14 10:15:47 -03:00
David Capello
52d088ef80 Fill SelectedFrames from Timeline in UIContext 2016-06-13 17:24:41 -03:00
David Capello
e6097eabac Add selected layers into doc::Site 2016-06-13 14:50:43 -03:00
David Capello
5f90ef7c9b Add properties in App to access directly to timeline/contextBar/workspace 2016-04-22 13:19:06 -03:00
David Capello
c49ec61fa0 Minor refactor: rename DocumentView::getEditor/Document() -> editor/document() 2016-02-13 01:33:43 -03:00
David Capello
7b8d9102e1 Add independent scroll/zoom values in preview window per document (fix #959) 2016-02-11 21:09:31 -03:00
David Capello
56854cdb9f Add symmetry mode (fix #208)
This is a first iteration of the feature, it doesn’t have handles to
move the symmetry line and it only contains two symmetry modes:
horizontal or vertical.

As an extra change, we have added the new Stroke type to wrap a vector
of gfx::Points and simplify some existing code in the ToolLoop.
2015-10-26 17:51:32 -03:00
David Capello
9966b48139 Add support to drag the selection in other editor when the active one is in MovingPixels state 2015-08-14 13:06:26 -03:00
David Capello
a8577a4273 Rename Context::isUiAvailable to Context::isUIAvailable 2015-05-18 17:04:31 -03:00
David Capello
f6be0c3be6 Replace ISettings with Preferences
Changes:
* Move FreehandAlgorithm/InkType/RotationAlgorithm/SelectionMode to
  app::tools namespace
* Removed ISettings, IToolSettings, IBrushSettings, ISelectionSettings,
  and IColorSwatchesStore (and implementations from UISettingsImpl)
* Added app::tools::PreferenceGlue to do some adjustments that
  UIToolSettingsImpl was doing
* Remove signals from App related to brush size/angle changes, and current
  tool change (there events can be observed directly from Preferences)
* Remove ColorBar::FgColor/BgColor, these options can be observed from
  Preferences::colorBar.fg/bgColor
2015-05-18 16:53:25 -03:00
David Capello
2bbaa45844 Unify Cut/Copy/Paste/Clear handling with InputChain class 2015-05-09 19:55:33 -03:00
David Capello
a489efdf03 Use ContextObserver to update the StatusBar
Instead of calling StatusBar::updateUsingEditor(Editor*), now the StatusBar
is a ContextObserver that observe changes in the active doc::Site. The
Editor notifies a ActiveSiteChange event when the active frame/layer
is changed.

Fix #657
2015-05-05 13:24:26 -03:00
David Capello
c3d7a96a87 Replace ContextObserver::onActiveDocumentChange() with onActiveSiteChange() 2015-05-05 12:58:50 -03:00
David Capello
ae03dd5461 Don't use last selected document as active document if UI is enabled
Related to bug found in #656. In this way, if the UI is enabled,
the active document is != null only if there is an active view for it.

Anyway, in batch mode we can potentially have a lot of bugs. There are
several UI commands that think that active view != null (and
current_editor != null) when the active document != null.
2015-05-04 16:25:28 -03:00
David Capello
b519901cef Add support to specify tags in --filename-format option (related to #607)
Now we can use "{tag}" (or "{innertag}") and "{outertag}" in the filename
format.
2015-04-30 17:02:57 -03:00
David Capello
21c4fd51d9 Move app::DocumentLocation to doc::Site
This is a first step to include the current selected range of layers
and frames inside the doc::Site structure. So in the future we'll not need
to know about the Timeline in commands that handle those ranges.
2015-04-20 16:27:09 -03:00
David Capello
82c485a054 StatusBar: Improve animation buttons style using a ButtonSet
Also now the play button changes to a stop button when the animation is
begin played.
2015-04-07 02:29:33 -03:00
David Capello
4fe1e9771e Animation controls always visible in StatusBar 2015-04-07 01:21:31 -03:00
David Capello
a42d9d1c00 Add new Editor PlayState so we can have several editors playing animations
With this change we share the logic to play animations between the Preview
window and Enter key/play animation.
2015-04-06 16:12:28 -03:00
David Capello
e24c03f929 Add possibility to move tabs between different WorkspaceTabs widgets 2015-04-02 15:43:50 -03:00
David Capello
6d107734f8 Remove app::UIContext::countViewsOf() 2015-03-31 11:52:25 -03:00
David Capello
ff66ea025c Add support to close Home tab with middle mouse button or right-click popup menu 2015-02-22 21:18:53 -03:00