1

When I open the pygame html page created with pygbag, the console opens in full screen and the pygame window is in the corner: (see image below)

How can I make the pygbag window open in full screen?

1

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36
Kucer0043
  • 27
  • 7
  • Have you looked at the documentation on adding other [templates](https://pygame-web.github.io/wiki/pygbag/#using-other-templates)? – import random Jul 08 '22 at 04:07
  • You helped me. Leave this question again, not as a comment, but as an answer, so I can mark it. – Kucer0043 Jul 08 '22 at 12:23
  • You are permitted to [answer your own question](https://stackoverflow.com/help/self-answer). For [`pygbag`](https://stackoverflow.com/search?q=pygbag), there aren't many questions on this site, so it's likely your question will be returned by anyone searching. So a detailed answer may be very useful. – import random Jul 10 '22 at 23:33
  • Check out the documentation on adding other templates . – Kucer0043 Jul 11 '22 at 10:01

1 Answers1

0

Short answer, you cannot, no web browser will allow your code to switch to fullscreen on page load without user intervention.

So now the default in pygbag is "fullscreen windowed" : that way pygame screen is always maximized inside the page which seems a good trade off.

To get console back, just add #debug to the url

but once user is -already- interacting with pygame, you can call real full screen via python with same code you would use on desktop.

Pmp P.
  • 407
  • 3
  • 9