rexrainbow / phaser3-rex-notes

Notes of phaser3 engine
MIT License
1.21k stars 260 forks source link

GetDefaultBounds returns incorrect size when using Phaser.Scale.RESIZE #267

Closed zpxp closed 2 years ago

zpxp commented 2 years ago

Create a game with config scale Phaser.Scale.RESIZE and no height and width defined to auto resize the window.

GetDefaultBounds for some components like Menu doesn't return the current screen width, only the default value.

This creates an artificially small bounds even though the game window is larger.

rexrainbow commented 2 years ago

I replace GetDefaultBounds method by GetViewPort in Menu class, now Menu can work with Phaser.Scale.RESIZE mode. Please get latest version of minify file. NPM package will update at end of this month.