Skip to main content

Thread: [Python+PyGame] Change window size


ok, so, i'm trying fanny pygame use interface, 2 reasons, won't go into, 'cause realised that's not thread about.

thread changing window's size, after it's been created, , stuff's happened on it. tried this:

code:
>>> while i<100:  	for event in pygame.event.get():  		if event.type == pygame.keydown:  			pygame.display.quit()  			pygame.display.init()  			screen=pygame.display.set_mode((900,900))  			pygame.display.flip()  		elif event.type == pygame.keyup:  			pygame.display.quit()  			pygame.display.init()  			screen=pygame.display.set_mode((468,60))  			pygame.display.flip()  		elif event.type == pygame.quit:  			sys.exit()  	pygame.time.delay(100)  	i+=1
which works. kinda. figured hacky, , confirmed when when window activated, flashed rapidly between 2 resolutions while, worked intended. (holding in key seemed toggle between 2 resolutions after key repeat delay.)

time.



Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [Python+PyGame] Change window size


Ubuntu

Comments

Popular posts from this blog

Joomla site hacked, cant see front and - Joomla! Forum - community, help and support

Christian Home School Programs - Joomla! Forum - community, help and support

Trouble with PF_OutFlag_I_USE_AUDIO and PF_CHECKOUT_LAYER_AUDIO