SHARE
TWEET

Pyry

a guest Feb 21st, 2009 126 Never
  1. import pygame, sys,os
  2. from pygame.locals import *
  3.  
  4. pygame.init()
  5.  
  6. window = pygame.display.set_mode((468, 60))
  7. pygame.display.set_caption('Monkey Fever')
  8. screen = pygame.display.get_surface()
  9.  
  10. monkey_head_file_name = os.path.join("data","chimp.bmp")
  11.  
  12. monkey_surface = pygame.image.load(monkey_head_file_name)
  13.  
  14. screen.blit(monkey_surface, (0,0))
  15. pygame.display.flip()
  16.  
  17. def input(events):
  18.    for event in events:
  19.       if event.type == QUIT:
  20.          sys.exit(0)
  21.       else:
  22.          print event
  23.  
  24. while True:
  25.    input(pygame.event.get())
RAW Paste Data
Top