Jump to content

Fullscreen mode loses background/transparency?


Dylan Cristy
 Share

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?

Link to comment
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?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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