Issue #344 : Add image spriting using spritesmith

This commit is contained in:
jdescottes
2015-11-29 21:46:24 +01:00
parent 6f5e2f130e
commit 8aa6eff715
123 changed files with 449 additions and 260 deletions

View File

@@ -107,7 +107,8 @@
newFrameButton.id = 'add-frame-action';
newFrameButton.className = 'add-frame-action';
newFrameButton.setAttribute('data-tile-action', ACTION.NEW_FRAME);
newFrameButton.innerHTML = '<p class="label">Add new frame</p>';
newFrameButton.innerHTML = '<div class="add-frame-action-icon icon-frame-plus-white">' +
'</div><div class="label">Add new frame</div>';
this.container.append(newFrameButton);
var needDragndropBehavior = (frameCount > 1);
@@ -178,7 +179,7 @@
cloneFrameButton.setAttribute('data-tile-number', tileNumber);
cloneFrameButton.setAttribute('data-tile-action', ACTION.CLONE);
cloneFrameButton.setAttribute('title', 'Duplicate this frame');
cloneFrameButton.className = 'tile-overlay duplicate-frame-action';
cloneFrameButton.className = 'tile-overlay duplicate-frame-action icon-frame-duplicate-white';
previewTileRoot.appendChild(cloneFrameButton);
canvasContainer.appendChild(this.getCanvasForFrame(currentFrame));
@@ -192,12 +193,12 @@
deleteButton.setAttribute('title', 'Delete this frame');
deleteButton.setAttribute('data-tile-number', tileNumber);
deleteButton.setAttribute('data-tile-action', ACTION.DELETE);
deleteButton.className = 'tile-overlay delete-frame-action';
deleteButton.className = 'tile-overlay delete-frame-action icon-frame-recyclebin-white';
previewTileRoot.appendChild(deleteButton);
// Add 'dragndrop handle'.
var dndHandle = document.createElement('div');
dndHandle.className = 'tile-overlay dnd-action';
dndHandle.className = 'tile-overlay dnd-action icon-frame-dragndrop-white' ;
previewTileRoot.appendChild(dndHandle);
}
var tileCount = document.createElement('div');

View File

@@ -39,7 +39,7 @@
secondaryColorPicker.change({isPrimary : false}, $.proxy(this.onPickerChange_, this));
this.setTitleOnPicker_(Constants.TRANSPARENT_COLOR, secondaryColorPicker);
var swapColorsIcon = $('.swap-colors-icon');
var swapColorsIcon = $('.swap-colors-button');
swapColorsIcon.click(this.swapColors.bind(this));
};

View File

@@ -86,7 +86,7 @@
};
ns.CheatsheetController.prototype.getToolIconClass_ = function (shortcut) {
return 'tool-icon ' + shortcut.getId();
return 'tool-icon cheatsheet-icon-' + shortcut.getId();
};
ns.CheatsheetController.prototype.initMarkupForCategory_ = function (category, container, iconClassProvider) {

View File

@@ -7,7 +7,7 @@
tooltipPosition = tooltipPosition || 'right';
var tpl = pskl.utils.Template.get('drawingTool-item-template');
return pskl.utils.Template.replace(tpl, {
cssclass : ['tool-icon', tool.toolId].join(' '),
cssclass : ['tool-icon', 'icon-' + tool.toolId].join(' '),
toolid : tool.toolId,
title : this.getTooltipText(tool),
tooltipposition : tooltipPosition