Skip to content
Snippets Groups Projects
Commit 16201be5 authored by 's avatar
Browse files

making quit button work

parent 0deb019a
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,14 @@ while True:
pygame.draw.rect(game,[180,180,180], [650,550,130,55], 0)
Quit = playgame_font.render('QUIT', True, (0, 0, 0))
game.blit(Quit,(650,550))
if ( 650 <= mousepos[0] <= 650+130 and 550 <= mousepos[1] <= 550 +55):
#checks if the mouse is hovering over the button
#checking if the button is clicked
if mouseclick[0] == 1:
#print ("quiting")
#pygame.display.quit()
pygame.quit()
sys.exit()
pygame.display.update()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment