Skip to content

Commit ab75b1a

Browse files
committed
Refactoring Game.resize
1 parent 44f69ea commit ab75b1a

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

src/boot/Game.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,20 @@ var Game = new Class({
709709
* @param {number} width - The new width of the game.
710710
* @param {number} height - The new height of the game.
711711
*/
712-
resize: function (width, height)
712+
resize: function ()
713713
{
714+
var width = this.scaleManager.baseSize.width;
715+
var height = this.scaleManager.baseSize.height;
716+
717+
this.renderer.resize();
718+
719+
// this.input.resize();
720+
721+
this.scene.resize(width, height);
722+
723+
this.events.emit('resize', width, height);
724+
725+
/*
714726
this.config.width = width;
715727
this.config.height = height;
716728
@@ -730,6 +742,7 @@ var Game = new Class({
730742
this.scene.resize(width, height);
731743
732744
this.events.emit('resize', width, height);
745+
*/
733746
},
734747

735748
/**

0 commit comments

Comments
 (0)