jakedotdk Posted December 19, 2015 Share Posted December 19, 2015 I need to show some gamecontrols by the side of the map, so I'd like to be able to crop the area used to display the tilemap on, to make room for the controls.I've looked at cropRect, but it doesn't seem to be what I need. Is there a nifty function I've overlooked? /Jake Link to comment Share on other sites More sharing options...
drhayes Posted December 21, 2015 Share Posted December 21, 2015 You could also draw the controls with black backgrounds so that the tilemap isn't visible behind them. Would that work? Link to comment Share on other sites More sharing options...
jakedotdk Posted December 22, 2015 Author Share Posted December 22, 2015 Hi drhayes Thanks for your suggestion.The only trouble is that the functionality which scrolls the map, when the player gets close to the border would make the player go under the controls.... /Jake Link to comment Share on other sites More sharing options...
BlitZ Posted December 22, 2015 Share Posted December 22, 2015 If your controls are created in the DOM and not painted in the Canvas then you could always just shrink the camera/viewport of your Phaser setup. jakedotdk 1 Link to comment Share on other sites More sharing options...
drhayes Posted December 22, 2015 Share Posted December 22, 2015 Ah, that's true! Not that I'm totally in love with my suggestion or anything, but what if you scrolled the map closer in? So that didn't happen? jakedotdk 1 Link to comment Share on other sites More sharing options...
jakedotdk Posted December 27, 2015 Author Share Posted December 27, 2015 Ah, that's true! Not that I'm totally in love with my suggestion or anything, but what if you scrolled the map closer in? So that didn't happen?Unfortunately the map is WAY bigger than the canvas/Phaser game.... /Jake Link to comment Share on other sites More sharing options...
jakedotdk Posted December 27, 2015 Author Share Posted December 27, 2015 If your controls are created in the DOM and not painted in the Canvas then you could always just shrink the camera/viewport of your Phaser setup.The controls are Phaser Buttons - so they would need to be painted on the canvas /Jake Link to comment Share on other sites More sharing options...
Tilde Posted December 28, 2015 Share Posted December 28, 2015 controls.fixedToCamera = true and controls.cameraOffset.setTo(whatever values)? Link to comment Share on other sites More sharing options...
Recommended Posts