Main screen update and loader with transparent background
This commit is contained in:
parent
4d4ae9c854
commit
8c0ef31a97
4 changed files with 4 additions and 1 deletions
BIN
design/main_screen.psd
Normal file
BIN
design/main_screen.psd
Normal file
Binary file not shown.
|
@ -109,6 +109,7 @@
|
||||||
|
|
||||||
StartScreen = ig.Game.extend({
|
StartScreen = ig.Game.extend({
|
||||||
background: new ig.Image('media/main_screen.png'),
|
background: new ig.Image('media/main_screen.png'),
|
||||||
|
clearColor: null,
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
ig.input.bind(ig.KEY.ENTER, 'start-game');
|
ig.input.bind(ig.KEY.ENTER, 'start-game');
|
||||||
|
@ -122,6 +123,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
draw: function() {
|
draw: function() {
|
||||||
|
ig.system.context.clearRect( 0 ,0, ig.system.realWidth, ig.system.realHeight );
|
||||||
this.parent();
|
this.parent();
|
||||||
this.background.draw(0, 0);
|
this.background.draw(0, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,7 @@ ig.Loader = ig.Class.extend({
|
||||||
|
|
||||||
|
|
||||||
draw: function() {
|
draw: function() {
|
||||||
|
ig.system.context.clearRect( 0 ,0, ig.system.realWidth, ig.system.realHeight );
|
||||||
this._drawStatus += (this.status - this._drawStatus)/5;
|
this._drawStatus += (this.status - this._drawStatus)/5;
|
||||||
var s = ig.system.scale;
|
var s = ig.system.scale;
|
||||||
var w = ig.system.width * 0.6;
|
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;
|
var y = ig.system.height * 0.5-h/2;
|
||||||
|
|
||||||
ig.system.context.fillStyle = '#000';
|
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.fillStyle = '#fff';
|
||||||
ig.system.context.fillRect( x*s, y*s, w*s, h*s );
|
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 |
Loading…
Reference in a new issue