Login Register






Pygame Mouse Events Trouble filter_list
Author
Message
RE: Pygame Mouse Events Trouble #11
(12-12-2015, 09:09 PM)xxxxxxxxxxxxxxxxxxxxxxxxx Wrote: No didn't notice I had to call screen only used pygameinit()
Any recommendations then?

This should work:
Code:
import pygame import sys # initilalization pygame.init() screen = pygame.display.set_mode((1024, 1024)) running = True while running: # proceed events for event in pygame.event.get(): if event.type == pygame.QUIT: running = False elif event.type == pygame.MOUSEBUTTONUP: print("Mouse event...") pygame.quit() sys.exit()

As you will see, it might not be exactly what you want...

Reply