import pygame
# Define colors
white=[255,255,255]
black=[0,0,0]
blue = [0, 0, 255]
# Call this function so the Pygame library can initialize itself
pygame.init()
# Create screen
screen = pygame.display.set_mode([384, 326])
# This sets the name of the window
pygame.display.set_caption('Ironing Maiden')
# Create a surface we can draw on
background = pygame.Surface(screen.get_size())
# Fill the screen with a black background
background.fill(black)
clock = pygame.time.Clock()
# Before the loop, load the sounds
pygame.mixer.music.load('C:\Users\Ian\Music\ironing_maiden.wav')
#pygame.mixer.music.play(-1, 0.0)
# Set positions of graphics
background_position=[0,0]
# Load and set up graphics
background_image = pygame.image.load("C:\Users\Ian\Pictures\ironingmaiden.jpg").convert()
player_image = pygame.image.load("C:\Users\Ian\Pictures\iron.png").convert()
player_image.set_colorkey(white)
done = False
mousedown = False
# Copy image to screen for background
screen.blit(background_image, background_position)
while done==False:
clock.tick(24)
for event in pygame.event.get():
if event.type == pygame.QUIT:
done=True
elif event.type == pygame.MOUSEBUTTONDOWN:
print "Left mouse button pressed"
pygame.draw.circle(screen,blue,((x+50),(y+50)),20)
# Get the current mouse position.
player_position = pygame.mouse.get_pos()
x=(player_position[0]-50)
y=(player_position[1]-50)
# Copy cusor overlay image to screen:
#screen.blit(player_image, [x,y])
#This does not work yet
pygame.display.flip()
pygame.quit ()