down_flag = 0
up_flag = 0
while True:
x, y = pygame.mouse.get_pos()
x-= mouse_cursor.get_width() / 2
y-= mouse_cursor.get_height() / 2
playSurface.fill(blackColour)
if down_flag == 1:
playSurface.blit(bottom1_1, bottom1Position)
else:
playSurface.blit(bottom1, bottom1Position)
if up_flag == 1:
wording()
if up_flag == 2:
up_flag = 0
playSurface.blit(mouse_cursor, (x, y))
pygame.display.flip()
for event in pygame.event.get():
if event.type == QUIT:
exit()
if event.type == MOUSEBUTTONDOWN :
if x < 620 and x > 520 and y < 60 and y > -10:
down_flag = 1
if down_flag == 1:
if event.type == MOUSEBUTTONUP:
up_flag += 1
down_flag = 0
fpsClock.tick(10)