Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- import pygame, sys
- from pygame.locals import *
- pygame.init()
- (windows_width, windows_height, windows_title) = (600, 400, "PyGame Event")
- screen = pygame.display.set_mode((windows_width,windows_height),0,32)
- pygame.display.set_caption(windows_title)
- windows_bgcolor = (255,255,255)
- mainLoop = True
- #initial data here
- while mainLoop:
- if pygame.event.peek(QUIT):
- mainLoop = False
- pygame.event.clear()
- screen.fill(windows_bgcolor)
- #create frame here
- pygame.display.update()
- pygame.quit()
- #destroy data here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement