chevron_left chevron_right
Login Register invert_colors photo_library


Stay updated and chat with others! - Join the Discord!
Thread Rating:
  • 0 Vote(s) - 0 Average


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




Messages In This Thread
RE: l - by Sans - 12-12-2015, 04:33 AM
RE: l - by xxxxxxxxxxxxxxxxxxxxxxxxx - 12-12-2015, 04:36 AM
RE: l - by m0dem - 12-12-2015, 04:39 AM
RE: l - by xxxxxxxxxxxxxxxxxxxxxxxxx - 12-12-2015, 04:41 AM
RE: l - by m0dem - 12-12-2015, 04:47 AM
RE: Pygame Mouse Events Trouble - by m0dem - 12-12-2015, 05:49 AM
RE: Pygame Mouse Events Trouble - by m0dem - 12-12-2015, 07:51 PM
RE: Pygame Mouse Events Trouble - by m0dem - 12-13-2015, 01:53 AM



Users browsing this thread: 1 Guest(s)