Binary Moon Posted June 16, 2014 Share Posted June 16, 2014 I have a canvas that is 800 x 600 and I want it to stretch to the full width of the page (with the height stretching proportionally). At the moment I am doing this using css (a simple width:100% on the canvas) and it mostly works just fine - however the mouse position properties don't seem to scale with the canvas and so events like onInputOver and onInputDown are offset from their scaled canvas position. So I was wondering if anyone knows how to work around this - or even if it's possible to work around this? Link to comment Share on other sites More sharing options...
j0hnskot Posted June 16, 2014 Share Posted June 16, 2014 try setting the game.scale.scaleMode = Phaser.ScaleManager.EXACT_FIT; Link to comment Share on other sites More sharing options...
Binary Moon Posted June 16, 2014 Author Share Posted June 16, 2014 Ah ha - I hadn't seen the scaleMode properties. SHOW_ALL seems to work better for my needs. I'm now using this: game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;game.scale.setScreenSize( true );Thanks a lot for your help! Link to comment Share on other sites More sharing options...
Recommended Posts