Sinisterly
Pygame Mouse Events Trouble - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Python (https://sinister.li/Forum-Python)
+--- Thread: Pygame Mouse Events Trouble (/Thread-Pygame-Mouse-Events-Trouble)

Pages: 1 2


RE: Pygame Mouse Events Trouble - m0dem - 12-13-2015

(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...