Answers for "pygame events"

1

pygame events

QUIT              none
ACTIVEEVENT       gain, state
KEYDOWN           key, mod, unicode, scancode
KEYUP             key, mod
MOUSEMOTION       pos, rel, buttons
MOUSEBUTTONUP     pos, button
MOUSEBUTTONDOWN   pos, button
JOYAXISMOTION     joy (deprecated), instance_id, axis, value
JOYBALLMOTION     joy (deprecated), instance_id, ball, rel
JOYHATMOTION      joy (deprecated), instance_id, hat, value
JOYBUTTONUP       joy (deprecated), instance_id, button
JOYBUTTONDOWN     joy (deprecated), instance_id, button
VIDEORESIZE       size, w, h
VIDEOEXPOSE       none
USEREVENT         code
Posted by: Guest on February-28-2021
1

how to pring events in pygame

import pygame
pygame.init()

screen = pygame.display.set_mode((500,300))
thing = 0
while thing < 100000000:
    thing += 1

event = pygame.event.get()
print (event)
pygame.quit()
Posted by: Guest on November-20-2020
0

pygame.event.get() in pygame

for event in pygame.event.get():
    if event.type == pygame.QUIT:
        # Close the program any way you want, or troll users who want to close your program.
        raise SystemExit
Posted by: Guest on August-13-2020

Browse Popular Code Answers by Language