Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #coding:utf-8
- import pygame
- pygame.init()
- pygame.display.set_caption("Ma fenêtre PYGAME")
- screen = pygame.display.set_mode((640, 480))
- launched = True
- while launched:
- for event in pygame.event.get():
- if event.type == pygame.QUIT:
- print("Au revoir !")
- launched = False
- elif event.type == pygame.KEYDOWN:
- if event.unicode == 'a':
- print("Touche A pressée")
- elif event.unicode == 'b':
- print("Touche B pressée")
- pygame.display.flip()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement