Dylan Cristy

Fullscreen mode loses background/transparency?

Recommended Posts

I am running my game as "transparent", directly in the body element, and setting a repeated tile background in the body through CSS.

If I enter fullscreen mode through a button click that triggers this.game.scale.startFullScreen(), the background tiling disappears and there's just a black background.

If I enter fullscreen mode "manually" (by physically pressing F11), the background remains.

What am I missing about how to start fullscreen mode?  How can I preserve the background?

Share this post


Link to post
Share on other sites

Hmm, I tried

this.game.stage.addChild(new Phaser.TileSprite(0, 0, this.game.width, this.game.height, 'MyTileName'));

but that seems to add it in front of the World, meaning, I can't see my main menu title or buttons.

I know the buttons are there though, because when I mouse over where they should be, the pointer changes to a hand.

And then if I click the button to start the game in fullscreen mode, the tiling does not continue to fill the screen, it ends at what would have been the height set in the TileSprite constructor.

Is there something I have to do to reset the tiling on resize?  Also, how do I get it behind the World?

Share this post


Link to post
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.

Guest
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.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.