Main screen update and loader with transparent background

This commit is contained in:
Ruben Müller 2013-04-11 21:59:42 +02:00
parent 4d4ae9c854
commit 8c0ef31a97
4 changed files with 4 additions and 1 deletions

BIN
design/main_screen.psd Normal file

Binary file not shown.

View File

@ -109,6 +109,7 @@
StartScreen = ig.Game.extend({
background: new ig.Image('media/main_screen.png'),
clearColor: null,
init: function() {
ig.input.bind(ig.KEY.ENTER, 'start-game');
@ -122,6 +123,7 @@
},
draw: function() {
ig.system.context.clearRect( 0 ,0, ig.system.realWidth, ig.system.realHeight );
this.parent();
this.background.draw(0, 0);
}

View File

@ -62,6 +62,7 @@ ig.Loader = ig.Class.extend({
draw: function() {
ig.system.context.clearRect( 0 ,0, ig.system.realWidth, ig.system.realHeight );
this._drawStatus += (this.status - this._drawStatus)/5;
var s = ig.system.scale;
var w = ig.system.width * 0.6;
@ -70,7 +71,7 @@ ig.Loader = ig.Class.extend({
var y = ig.system.height * 0.5-h/2;
ig.system.context.fillStyle = '#000';
ig.system.context.fillRect( 0, 0, 480, 320 );
//ig.system.context.fillRect( 0, 0, 480, 320 );
ig.system.context.fillStyle = '#fff';
ig.system.context.fillRect( x*s, y*s, w*s, h*s );

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 16 KiB