Add canvas background switcher

A quick integration to make our minds on different backgrounds and ask
for feedback
This commit is contained in:
Vince 2013-06-14 13:16:18 +02:00
parent 05edee6f3c
commit d489504a88
7 changed files with 34 additions and 1 deletions

View File

@ -72,7 +72,7 @@ body {
}
.canvas-container .canvas-background {
background: url(../img/medium_canvas_background.png) repeat;
background: url(../img/canvas_background/medium_canvas_background.png) repeat;
position: absolute;
top: 0;
right: 0;
@ -80,6 +80,23 @@ body {
left: 0;
}
.light-canvas-background .canvas-background {
background: url(../img/canvas_background/light_canvas_background.png) repeat;
}
.medium-canvas-background .canvas-background {
background: url(../img/canvas_background/medium_canvas_background.png) repeat;
}
.lowcont-medium-canvas-background .canvas-background {
background: url(../img/canvas_background/lowcont_medium_canvas_background.png) repeat;
}
.lowcont-dark-canvas-background .canvas-background {
background: url(../img/canvas_background/lowcont_dark_canvas_background.png) repeat;
}
.canvas.canvas-overlay {
position: absolute;
top: 0;

View File

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 223 B

View File

Before

Width:  |  Height:  |  Size: 431 B

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

View File

Before

Width:  |  Height:  |  Size: 418 B

After

Width:  |  Height:  |  Size: 418 B

View File

@ -38,6 +38,15 @@
<label for="show-grid">Show grid</label>
</div>
</div>
<div style="float: left; margin-top: 20px; color: #fff;">
Canvas background:
<select id="canvas-picker" style="width:100px;">
<option value="light-canvas-background">Light</option>
<option value="lowcont-medium-canvas-background">Medium - low contrast</option>
<option value="medium-canvas-background" selected="selected">Medium - high contrast</option>
<option value="lowcont-dark-canvas-background">Dark - low constrast</option>
</select>
</div>
</div>
</div>

View File

@ -70,6 +70,13 @@ $.namespace("pskl");
$('body').tooltip({
selector: '[rel=tooltip]'
});
$('#canvas-picker').change(function(evt) {
$('#canvas-picker option:selected').each(function() {
console.log($(this).val());
$('html')[0].className = $(this).val();
});
});
},
render : function (delta) {