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:
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.)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
time.
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [Python+PyGame] Change window size
Ubuntu
Comments
Post a Comment