-
Notifications
You must be signed in to change notification settings - Fork 0
/
Instructions.py
56 lines (47 loc) · 2.37 KB
/
Instructions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import pygame
from pygame.locals import *
import SeeSawStars
import LevelSelect
pygame.init()
screen = pygame.display.set_mode([1200,700])
def instructionsMenu():
x=1
background = pygame.image.load("instructions1.png")
backgroundrec = background.get_rect()
while True:
for event in pygame.event.get():
if event.type == QUIT or (event.type == KEYDOWN and K_ESCAPE):
return
if event.type == MOUSEBUTTONDOWN:
location = pygame.mouse.get_pos()
if x == 2:
if location[1] > 560 and location[1] < 650:
if location[0] > 20 and location[0] < 250:
background = pygame.image.load("instructions1.png")
backgroundrec = background.get_rect()
x = 1
if location[1] > 560 and location[1] < 650:
if location[0] > 930 and location[0] < 1180:
background = pygame.image.load("instructions3.png")
backgroundrec = background.get_rect()
x = 3
elif x == 1:
if location[1] > 560 and location[1] < 650:
if location[0] > 20 and location[0] < 250:
return
if location[1] > 560 and location[1] < 650:
if location[0] > 950 and location[0] < 1180:
background = pygame.image.load("instructions2.png")
backgroundrec = background.get_rect()
x = 2
elif x==3:
if location[1] > 560 and location[1] < 650:
if location[0] > 20 and location[0] < 250:
background = pygame.image.load("instructions2.png")
backgroundrec = background.get_rect()
x = 2
if location[1] > 560 and location[1] < 650:
if location[0] > 950 and location[0] < 1180:
return
screen.blit(background, backgroundrec)
pygame.display.update()