Commit 1916f235 authored by Neil Fraser's avatar Neil Fraser

Remove failed attempt at spriting icons.

parent 3e12c1ea
This diff is collapsed.
...@@ -86,7 +86,7 @@ Blockly.HSV_VALUE = 0.65; ...@@ -86,7 +86,7 @@ Blockly.HSV_VALUE = 0.65;
* Sprited icons and images. * Sprited icons and images.
*/ */
Blockly.SPRITE = { Blockly.SPRITE = {
width: 84, width: 64,
height: 92, height: 92,
url: 'sprites.png' url: 'sprites.png'
}; };
......
...@@ -150,14 +150,18 @@ Blockly.Trashcan.prototype.top_ = 0; ...@@ -150,14 +150,18 @@ Blockly.Trashcan.prototype.top_ = 0;
* @return {!Element} The trash can's SVG group. * @return {!Element} The trash can's SVG group.
*/ */
Blockly.Trashcan.prototype.createDom = function() { Blockly.Trashcan.prototype.createDom = function() {
/* /* Here's the markup that will be generated:
<g> <g>
<clippath id="blocklyTrashBodyClipPath"> <clippath id="blocklyTrashBodyClipPath">
<rect width="47" height="45" y="15"></rect> <rect width="47" height="45" y="15"></rect>
</clippath> </clippath>
<image width="64" height="92" y="15" href="media/trashbody.png" <image width="64" height="92" y="-32" xlink:href="media/sprites.png"
clip-path="url(#blocklyTrashBodyClipPath)"></image> clip-path="url(#blocklyTrashBodyClipPath)"></image>
<image width="47" height="15" href="media/trashlid.png"></image> <clippath id="blocklyTrashLidClipPath">
<rect width="47" height="15"></rect>
</clippath>
<image width="84" height="92" y="-32" xlink:href="media/sprites.png"
clip-path="url(#blocklyTrashLidClipPath)"></image>
</g> </g>
*/ */
this.svgGroup_ = Blockly.createSvgElement('g', {}, null); this.svgGroup_ = Blockly.createSvgElement('g', {}, null);
......
media/sprites.png

4.39 KB | W: | H:

media/sprites.png

1.1 KB | W: | H:

media/sprites.png
media/sprites.png
media/sprites.png
media/sprites.png
  • 2-up
  • Swipe
  • Onion skin
<?xml version="1.0" encoding="utf-8" standalone="no"?> <?xml version="1.0" encoding="utf-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="84px" height="92px"> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="64px" height="92px">
<style type="text/css"> <style type="text/css">
#background { #background {
fill: none; fill: none;
} }
.shield {
fill: #00c;
stroke: #ccc;
stroke-width: 1px;
}
.mark {
fill: #ccc;
font-family: sans-serif;
font-size: 9pt;
font-weight: bold;
text-anchor: middle;
}
.hovered .shield {
fill: #00f;
stroke: #fff;
}
.hovered .mark {
fill: #fff;
}
.mutator .mark {
font-size: 14pt;
}
.arrows { .arrows {
fill: #000; fill: #000;
stroke: none; stroke: none;
...@@ -43,34 +21,7 @@ ...@@ -43,34 +21,7 @@
fill: #888; fill: #888;
} }
</style> </style>
<rect id="background" width="84" height="92" x="0" y="0" /> <rect id="background" width="64" height="92" x="0" y="0" />
<g transform="translate(47.5, 35.5)">
<g class="comment" transform="translate(0, 0)">
<circle class="shield" r="8" cx="8" cy="8" />
<text class="mark" x="8" y="12.75">?</text>
</g>
<g class="comment hovered" transform="translate(20, 0)">
<circle class="shield" r="8" cx="8" cy="8" />
<text class="mark" x="8" y="12.75">?</text>
</g>
<g class="warning" transform="translate(0, 20)">
<path class="shield" d="M 2,15 Q -1,15 0.5,12 L 6.5,1.7 Q 8,-1 9.5,1.7 L 15.5,12 Q 17,15 14,15 z" />
<text class="mark" x="8" y="13">!</text>
</g>
<g class="warning hovered" transform="translate(20, 20)">
<path class="shield" d="M 2,15 Q -1,15 0.5,12 L 6.5,1.7 Q 8,-1 9.5,1.7 L 15.5,12 Q 17,15 14,15 z" />
<text class="mark" x="8" y="13">!</text>
</g>
<g class="mutator" transform="translate(0, 40)">
<rect class="shield" width="16" height="16" rx="4" ry="4" />
<text class="mark" x="8" y="13.5">&#9881;</text>
</g>
<g class="mutator hovered" transform="translate(20, 40)">
<rect class="shield" width="16" height="16" rx="4" ry="4" />
<text class="mark" x="8" y="13.5">&#9881;</text>
</g>
</g>
<g> <g>
<path class="arrows" d="M 13,1.5 13,14.5 1.74,8 z" /> <path class="arrows" d="M 13,1.5 13,14.5 1.74,8 z" />
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment