Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib.request
- import pygame
- f, h = urllib.request.urlretrieve('https://yastatic.net/s3/lyceum/content/image/pygame/arrow.png')
- img = open(f)
- if __name__ == '__main__':
- pygame.init()
- x, y = 0, 0
- size = width, height = 800, 600
- sc = pygame.display.set_mode(size)
- imgp = pygame.image.load(img).convert()
- pygame.mouse.set_visible(False)
- while True:
- for i in pygame.event.get():
- if i.type == pygame.QUIT:
- exit(0)
- elif i.type == pygame.MOUSEMOTION:
- sc.fill((0, 0, 0))
- sc.blit(imgp, i.pos)
- pygame.display.update()
- pygame.quit()
Add Comment
Please, Sign In to add comment