diff options
| author | Gubolin <gubolin@fantasymail.de> | 2014-12-07 11:53:41 +0100 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2014-12-07 11:53:41 +0100 |
| commit | 22a09b5019ecf7eea6cffd67ae4404987e44135c (patch) | |
| tree | a1b399ed77a603cc09550327aeceb41823949e16 /blocks.js | |
| parent | 54da483ee90eaac2f92d6aa1ee9394b3a77d2181 (diff) | |
| parent | 4013e79a7421b9e6baacc8e34ae7a8ef188b38cb (diff) | |
| download | snap-22a09b5019ecf7eea6cffd67ae4404987e44135c.tar.gz snap-22a09b5019ecf7eea6cffd67ae4404987e44135c.zip | |
Merge branch issue_405
Diffstat (limited to 'blocks.js')
| -rw-r--r-- | blocks.js | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -7774,6 +7774,8 @@ SymbolMorph.prototype.names = [ 'pointRight', 'gears', 'file', + 'mutedSounds', + 'unmutedSounds', 'fullScreen', 'normalScreen', 'smallStage', @@ -7898,6 +7900,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': @@ -8100,6 +8106,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'), |
