Commit Graph

2270 Commits

Author SHA1 Message Date
David Capello
5b5a2cfd9f Add support to copy and paste layers between different documents 2014-08-08 10:33:45 -03:00
David Capello
1391afb694 Fix gcc compilation error 2014-08-08 01:00:22 -03:00
David Capello
626ec1d2ba Add MoveTaskCommand: now you can move the selection with Shift+arrow keys 2014-08-08 01:00:02 -03:00
David Capello
6d1602f278 Minor change in gui.xml 2014-08-07 20:26:02 -03:00
David Capello
9fd60f1119 Move Timeline logic to drag-and-drop ranges to app::DocumentRange/move_range/copy_range
This fixes issue 433.
2014-08-07 20:19:31 -03:00
David Capello
0f99c78174 Win32: Return HTCLIENT when the mouse is above scrollbars but inside the client area 2014-08-07 08:45:51 -03:00
David Capello
0d2b3d1d68 Don't show Win32 scrollbar popup when the window is right-clicked in the scrollbars area 2014-08-07 08:44:30 -03:00
David Capello
7db6ea53c3 Add "Contiguous" option/checkbox for the paint bucket tool (true by default) 2014-08-07 00:07:24 -03:00
David Capello
d74944c885 Updated NES palettes (issue 411 for details and authors) 2014-08-06 08:57:41 -03:00
David Capello
fcfaacd4d7 Update version to 1.0.3-dev 2014-08-06 00:50:35 -03:00
David Capello
a856cdf8bd Add support for command key in Mac OS X platform
Other change:
- Fixed ui::Message::onlyCtrl/Shift/AltPressed() member functions
2014-08-06 00:42:50 -03:00
David Capello
c104b4812d Add doc::Settings to get the undo limit (or other settings that will be in the logic/doc layer) 2014-07-31 00:19:58 -03:00
David Capello
21e9078fd7 Fix asserts in file/gif_tests 2014-07-30 01:45:59 -03:00
David Capello
91b0c2d071 Refactor: Remove "get" part for member functions that act like a simple getter
Additional change:
- Added Cel::image() to get the related image of the cel directly
2014-07-30 01:28:15 -03:00
David Capello
03a085d1e5 Fix problem deleting app::Document that are inside a Context 2014-07-29 01:29:04 -03:00
David Capello
81ffb0c5bd Refactor: Create doc::Context and move some logic from app::Document to doc::Document
The objective of these changes is to create a more testable doc/logic API.

Included changes:
- Added doc::Context, doc::Documents (the old app::Documents),
  and doc::Sprites (and observers for each)
- Added raster::Sprite::createBasicSprite()
- Added doc::ColorMode (equal to raster::PixelFormat)
- Added some methods to doc::Document: context(), sprites(), sprite()
  (to replace app::Document::getSprite()), width/height(), colorMode(),
  name(), and close()
- Moved app::DocumentObserver/Event to doc::DocumentObserver/Event
- Replaced app::ContextObserver with doc::DocumentsObserver and a couple
  of signals.
- Renamed app::Context::getActiveDocument() with
  doc::Context::activeDocument()
- Renamed app::Context::getActiveLocation() with
  app::Context::activeLocation()
- Removed app::ContextObserverList
- Removed app::DocumentId (now we can use doc::ObjectId)
- Removed app::Context::getSettings()
2014-07-29 00:53:24 -03:00
David Capello
a20bb2d4d7 Change Timeline logic to work with LayerIndex instead of inverted UI indexes
This is a work-in-progress, dropRange() must be reimplemented. Now that
the Timeline uses LayerIndex, we could change Timeline::Range to
DocumentRange and create unit tests for the logic side.
2014-07-24 23:50:45 -03:00
David Capello
9bea45f4ec Add UI to fix issue 433 (we cannot drop frames at the end or layers at the bottom)
The logic is not ready.
2014-07-21 22:59:45 -03:00
David Capello
8e55432cca Avoid warning about undefined dtor for UniquePtr<Resource> 2014-07-21 22:49:59 -03:00
David Capello
ce77a38303 Fix base::Observers impl: Copy the whole list of observers before we start iterating them (fix issue 427)
There are cases where we need to modify the list of observers of certain
entity when we are in a notification loop (i.e. iterating its observers).
E.g. A general update notification about the current document to all its
observers could create the mini editor, which is a DocumentObserver, so
a new observer is added to the list in the same notification loop.

Anyway, as we cannot modify the observer list (std::vector) when we are
notifying them (any modification in the std::vector invalidates
its iterators), the fix is quite easy (but not optimal): we can create
a copy of the observers list so we can iterate the list.

Note: If we have performance issues about this, we could try a std::list,
but at the moment this fix is quite enough.
2014-07-21 01:39:01 -03:00
David Capello
411ceda0e7 Add options to save GIF files (how to quantize palettes mainly)
* Added "context" parameter to save/load routines so we can test them.
2014-07-19 22:01:39 -03:00
David Capello
b9a1fa8e17 Put batck the "Pixel perfect" checkbox in the contextbar
The new UI will be available in v1.1, and it's better if we don't modify
the v1.0 interface too much at this moment.
2014-07-17 09:54:04 -03:00
David Capello
31e565a2b0 Add "gen" utility to generate UI widget wrappers from XML files 2014-07-13 13:24:57 -03:00
David Capello
958d8f922f Merge branch 'next' into dev 2014-07-11 01:15:30 -03:00
David Capello
e09bb7d3f2 Fix file_tests 2014-07-06 22:10:48 -03:00
David Capello
c004fb6bcd Set palette when the frame of the current editor changes 2014-07-06 22:10:30 -03:00
David Capello
4a17ee351c Minor changes in cmd_goto_frame.cpp 2014-07-06 21:48:46 -03:00
David Capello
fa760d8a21 Restore filename if "save as" fails 2014-07-06 21:29:36 -03:00
David Capello
6861bd7bb7 Minor change in options dialog 2014-07-06 20:51:27 -03:00
David Capello
b1d27d66e2 Fix issue 414 for WinXP in classic theme: unable to resize window from bottom/right edges
On WinXP classic theme we receive a WM_NCHITTEST messages for the
scrollbars, and as they overlap the resize borders (see WM_NCCALCSIZE
handler) we have to return a proper value as if they really were the
borders of the window.

Note: Scrollbars are still visible in classic theme, that is just ugly,
but at least the user can resize the window from bottom and right edges.
2014-07-06 20:37:13 -03:00
David Capello
d3aa22ac12 Mac OS X: Hide native mouse cursor (related to issue 350) 2014-06-29 16:10:12 -03:00
David Capello
5c4c155dea Missing #include <stdexcept> to use std::runtime_error exception 2014-06-29 16:07:43 -03:00
David Capello
619cca7dfd Fix passing non-POD type to printf-like function 2014-06-29 16:07:24 -03:00
David Capello
950a9fe82f Add button to create new folders in FileSelector (issue 233) 2014-06-28 18:01:32 -03:00
David Capello
4b7bf5b835 Merge she::Color and ui::Color types in gfx::Color 2014-06-28 16:10:39 -03:00
David Capello
901b2acc06 Remove some references to <allegro.h> 2014-06-28 11:17:22 -03:00
David Capello
b37ec489f6 Remove ui::Widget::isScancodeMnemonic() member function 2014-06-28 11:14:03 -03:00
David Capello
2fa7ee5a77 Fix tests/test.h 2014-06-28 10:49:47 -03:00
David Capello
738d6ec4ee Rename _unittest.cpp files to _tests.cpp 2014-06-28 10:49:38 -03:00
David Capello
7ebc90678f Use ui::Graphics instead of Allegro in Editor's brush preview routines
* Remove color_utils::color_for_allegro()
* Rename editor_draw/move/clear_cursor() -> draw/move/clearBrushPreview()
* Rename Editor::get_raw_cursor_color() and Editor::is_cursor_mask()
* Add Graphics::get/putPixel() and Graphics::width/height()
* Add SetClip class
2014-06-28 10:33:58 -03:00
David Capello
0b8d88d6ee Add "slice" ink and tool (it is not yet implemented) 2014-06-27 22:58:38 -03:00
David Capello
9fe53de8eb Fix regression bug in SkinTheme::sliceSheet() introduced in dbad153698
The skin's sprite sheet is loaded as an RGBA surface, and slices must be
created as RGBA sub-surfaces.
2014-06-26 23:53:41 -03:00
David Capello
5bbff161b9 Now ui::Graphics uses she::Surface instead of Allegro BITMAP 2014-06-26 22:14:39 -03:00
David Capello
331688bd86 Add "Zoom with Scroll Wheel" option (on/true by default) 2014-06-22 22:35:51 -03:00
David Capello
0c250df97a Separate Options dialog in different sections
* Add ui::Panel widget
2014-06-22 21:56:04 -03:00
David Capello
1f5ae8d75b Remove <allegro.h> from resource_finder.cpp 2014-06-22 18:59:19 -03:00
David Capello
10bd7142eb Change ui::ImageView to use she::Surface instead of Allegro BITMAP 2014-06-22 18:57:30 -03:00
David Capello
dbad153698 Add she::Font class (wrapper of Allegro FONT)
This is an huge refactor to avoid handling Allegro FONT directly. Some
changes:
* Add she::System::defaultDisplay/Font, createRgbaSurface, loadSurface,
  and loadRgbaSurface.
* Rename she::CreateSystem/Instance to she::create_system/instance.
* Remove ui/font.cpp and move ui/fontbmp.cpp to she library.
* ui::IButtonIcon uses she::Surface instead of BITMAP.
* Rename she::LockedSurface::drawAlphaSurface -> drawRgbaSurface
* Rename ui::SetDisplay -> set_display
* Rename _ji_font_text_len -> ui::Graphics::measureUIStringLength
2014-06-22 18:53:14 -03:00
David Capello
b7dca01532 Win: Use MessageBoxW instead of allegro_message() in she::error_message() 2014-06-18 01:00:18 -03:00
David Capello
1ff5e82cef Use she::error_message() in app_main() 2014-06-18 00:59:50 -03:00