Python Forum
[PyGame] How to get the size of resizable window?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] How to get the size of resizable window?
#2
This is what works on my system :

import pygame
pygame.init ()
screen = pygame.display.set_mode ((200, 200), pygame.RESIZABLE, 32)

while True :
	for event in pygame.event.get () :
		if event.type == pygame.VIDEORESIZE :
			print (event.size)
		if event.type == pygame.QUIT :
			quit ()
nilamo and michael1789 like this post
Reply


Messages In This Thread
RE: How to get the size of resizable window? - by BashBedlam - Feb-21-2021, 03:01 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020