Advertisement
here2share

# pygame2pys60.txt ZZZ

Sep 2nd, 2016
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # pygame2pys60
  2.  
  3. # pygame: import pygame from pygame.locals import *
  4. import e32, graphics from appuifw import *
  5.  
  6. # pygame: sound = pygame.mixer.Sound(fullname) sound.play()
  7. import audio sound = audio.Sound.open(fullname) sound.play()
  8.  
  9. # pygame: window = pygame.display.set_mode((2, 60))
  10. app.screen = 'large' # or 'normal', 'full'
  11.  
  12. # pygame: screen = pygame.display.get_surface()
  13. app.body = canvas = Canvas(None, key.handle_event) # you need to create key (a Keyboard instance) before this
  14.  
  15. # pygame: image = pygame.image.load(file_name)
  16. image = graphics.Image.open(file_name)
  17.  
  18. # pygame: screen.blit(image, (0,0)); pygame.display.flip()
  19. canvas.blit(image, target=(0,0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement