0

How do I "maximize" a window in pygame, with "maximize" I mean this:

an almost maximized window

Not this:

enter image description here

Do you have any idea of how can this be done?

Rabbid76
  • 202,892
  • 27
  • 131
  • 174
Wolf
  • 17
  • 4
  • These images in the question do not show a [Pygame](https://www.pygame.org/news) window. These images show the console window. – Rabbid76 Feb 13 '23 at 19:27

1 Answers1

1

You can maximize the Pygame window using the set_mode() method and passing the pygame.FULLSCREEN argument:

import pygame

pygame.init()

screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)

# your code here

pygame.quit()

This will make the window display in full screen. If you want to exit full screen mode, just press the "Esc" key or call the set_mode() method again, this time without the pygame.FULLSCREEN argument.