Jump to content

ScaleMode and margin


Recommended Posts

Hi there,


I want to create a little Jump'n'Run game with Phaser which can be played on desktop computers and mobile devices. By the fact that mobile browsers don't provide cursor keys I created a control div with buttons (left, right, jump). If the browser is on a touch device this div will be displayed on window.onload.

The problem is that I want the game to be scaleable. So I set "game.stage.scaleMode" to "Phaser.StageScaleMode.SHOW_ALL". Now the canvas uses the full browser height and I have no idea to reserve e.g. 100px on the page bottom.


Any ideas?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...