¡Buenas! Soy un aprendiz de Python & Pygame, y estoy empezando a programar, y este simple código no me funciona.
background_image_filename = 'fondo.png'
mouse_image_filename = 'imagen1.JPEG'
import pygame
from pygame.locals import *
from sys import exit
pygame.init()
screen = pygame.display.set_mode((620, 480), 0, 32)
pygame.display.set_caption("Hello, world")
background = pygame.image.load(background_image_filename).convert()
mouse_cursor = pygame.image.load(mouse_image_filename).convert_alpha()
while True:
for event in pygame.event.get()
if event.type == QUIT:
exit()
screen.blit(background, (0,0))
x, y = pygame.mouse.get_pos()
x-= mouse_cursor.get_width() / 2
y-= mouse_cursor,get_height() / 2
screen.blit(mouse_cursor, (x,y))
pygame.display.upadate()
Me resulta extraño, porque viene de un libro, y no sé porqué no funciona.
Gracias anticipadas