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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.