mirror of
https://github.com/photonstorm/phaser
synced 2024-11-15 01:17:43 +00:00
Game.resize now resizes the SceneManager and emits an event.
This commit is contained in:
parent
c9d3c1a279
commit
cf01056913
1 changed files with 12 additions and 0 deletions
|
@ -444,6 +444,14 @@ var Game = new Class({
|
|||
this.loop.focus();
|
||||
},
|
||||
|
||||
/**
|
||||
* Game Resize event.
|
||||
*
|
||||
* @event Phaser.Game#resizeEvent
|
||||
* @param {number} width - The new width of the Game.
|
||||
* @param {number} height - The new height of the Game.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Updates the Game Config with the new width and height values given.
|
||||
* Then resizes the Renderer and Input Manager scale.
|
||||
|
@ -462,6 +470,10 @@ var Game = new Class({
|
|||
this.renderer.resize(width, height);
|
||||
|
||||
this.input.resize();
|
||||
|
||||
this.scene.resize(width, height);
|
||||
|
||||
this.events.emit('resize', width, height);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue