- Using labels for the import type radio buttons
- Non animated gifs can now be imported as a spritesheet
- Fixing frame slicing to ignore a partial frame while looping
- The import dialog now allows users to select an option between single image or spritesheet importing
- The spritesheet option allows setting of the size of an indivdual frame and the offset from the left/top from which to start slicing frames
- Selecting the spritesheet option will display a frame slice grid over the preview image to give a quick view of where the frames will be made
- When importing the spritesheet blank (transparent) frames and also partial frames will be ignored
- This allows users to import spritesheets that have been packed into a larger image with excess padding
- The width/height of the canvas used to draw the frame grid in the preview was incorrect, so the stroke width was too thick
- This change fixes it so the stroke width remains nice and thin by applying the correct canvas size
- Updated the import dialog to allow users to specify the number of frames in the image (which defaults to 1 x and 1 y)
- Setting the frame count for x and y will draw a dotted line in the preview that shows where the image will be split into individual frames
- When imported with a frame count above 1, the source image will be split into the different frames and loaded just as if it were an animated gif
- This allows users to import existing spritesheet pngs, including those produced by the piskel export function
- moved preview controllers to pskl.controller.preview
- renamed PreviewFilmController to FramesListController
- renamed AnimatedPreviewController to PreviewController
- fixed init of popup preview on IE (use ownerDocument to create
TiledFrameRenderer container) => should try with innerHTML
- moved open popup button inside the minimap (show on hover)
- Added import button on create palette dialog
- implemented import from images
- missing limitation on color count when importing !!
- should remove button when editing existing palette
- Added cancel button to create palette dialog
- Added escape/unescapeHtml methods to pskl.utils
- Escaping palette name now ...
- Removed outdated comment in app.js regarding appEngine token
- Added a call to destroy() during dialogClose of AbstractDlgCtrl
Image import is now triggering a popup after selecting the file.
Same for local saves.
Drag and drop of .piskel files opens the piskel immediately !
Remains to do :
- redesign the dialog for import image and browse local
- create dialog for recover session
- improve recover session to handle more than the last session
- added rename icon in layers list
- mutualized CSS for edit icon between palette manager and layers list
- new CSS file icons.css for actions/links/buttons using icons
- layers are no longer retrieved by name, but by index
The palette manager UI is redrawn almost everytime the model changes.
This way, UI is always in sync with the model.
However, spectrum instances are spawning everytime a redraw is performed.
They cannot be cleaned before the redraw is performed, because if a
spectrum picker is opened, it should remain like this. This allows the
cuser to keep modifying a color without having to reopen the picker each
time he/she stops on a color.
As a workaround, I keep a reference on all the spectrum containers and
destroy them all when the manager is disposed.
Ideally I'd prefer to have a single spectrum instance that I could move
around depending on which color the user wants to edit. I.e. I want to
mutualize all the picker instances ... But this will require a bit more
work.
Also added a notification when the user saves a palette.
Updated z-index of user-message container so that it is always above the
rest of the application.
- Fixed : manager UI is redrawn after save
- the Selected palette is saved as a user preference
- default background is now the dark one
- the selected palette is not reset after closing palette manager
- can create palettes
- palettes are persisted to local storage
- can add colors to palettes using spectrum color picker
- can remove created palettes
- can revert changes on unsaved palettes
Merge branch 'master' into feature-color-palette
Conflicts:
src/css/spectrum/spectrum-overrides.css