Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame,sys
- screen=pygame.display.set_mode([640,480])
- screen.fill([255,255,255])
- pygame.display.flip()
- clock=pygame.time.Clock()
- stage=1
- def startingScreen():
- for events in pygame.event.get():
- if events.type==pygame.QUIT:
- pygame.quit()
- sys.exit()
- if events.type==pygame.MOUSEBUTTONDOWN:
- print("mouse clicked")
- mouse_x,mouse_y=pygame.mouse.get_pos()
- print("Current position of mouse is ",mouse_x," ",mouse_y)
- if (mouse_x>=220 and mouse_y>=282) \
- and (mouse_x<=435 and mouse_y>=282) \
- and(mouse_x>=220 and mouse_y<=350) \
- and (mouse_x<=435 and mouse_y<=350):
- print("Going to the next screen")
- img=pygame.image.load('start.png')
- screen.blit(img,[0,0])
- def gamePlay():
- screen.fill([12,123,244])
- while True:
- startingScreen()
- pygame.display.flip()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement