From b4ffac6cdab6f684396992a3e60ba03c9ad92e31 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 3 Aug 2014 11:17:08 +0200 Subject: Update blocks.js --- blocks.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/blocks.js b/blocks.js index 2e297ab..9f9e505 100644 --- a/blocks.js +++ b/blocks.js @@ -7714,6 +7714,8 @@ SymbolMorph.prototype.names = [ 'pointRight', 'gears', 'file', + 'mutedSounds', + 'unmutedSounds', 'fullScreen', 'normalScreen', 'smallStage', @@ -7838,6 +7840,10 @@ SymbolMorph.prototype.symbolCanvasColored = function (aColor) { return this.drawSymbolGears(canvas, aColor); case 'file': return this.drawSymbolFile(canvas, aColor); + case 'mutedSounds': + return this.drawSymbolMutedSounds(canvas, aColor); + case 'unmutedSounds': + return this.drawSymbolUnmutedSounds(canvas, aColor); case 'fullScreen': return this.drawSymbolFullScreen(canvas, aColor); case 'normalScreen': @@ -8040,6 +8046,34 @@ SymbolMorph.prototype.drawSymbolFile = function (canvas, color) { return canvas; }; +SymbolMorph.prototype.drawSymbolMutedSounds = function (canvas, color) { + // answer a canvas showing a muted sounds toggling symbol + var ctx = canvas.getContext('2d'), + w = canvas.width, + h = canvas.height, + w2 = w / 2, + h2 = h / 2; + + ctx.fillStyle = color.darker(40).toString(); + ctx.fillRect(0, 0, w, h); + + return canvas; +}; + +SymbolMorph.prototype.drawSymbolUnmutedSounds = function (canvas, color) { + // answer a canvas showing a UNmuted sounds toggling symbol + var ctx = canvas.getContext('2d'), + w = canvas.width, + h = canvas.height, + w2 = w / 2, + h2 = h / 2; + + ctx.fillStyle = color.darker(60).toString(); + ctx.fillRect(0, 0, w, h); + + return canvas; +}; + SymbolMorph.prototype.drawSymbolFullScreen = function (canvas, color) { // answer a canvas showing two arrows pointing diagonally outwards var ctx = canvas.getContext('2d'), -- cgit v1.3.1