Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wacyk Jean-Gabriel
Wiiberry
Commits
6e7bbb3b
Commit
6e7bbb3b
authored
Jan 20, 2019
by
Wacyk Jean-Gabriel
Browse files
Update menu.py
parent
db1a4509
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/menu.py
View file @
6e7bbb3b
...
...
@@ -33,44 +33,44 @@ class Menu(object):
return
True
elif
self
.
yellow_rect
.
collidepoint
(
position
):
player
.
set_color
(
constants
.
YELLOW
)
return
True
return
True
elif
self
.
orange_rect
.
collidepoint
(
position
):
player
.
set_color
(
constants
.
ORANGE
)
return
True
player
.
set_color
(
constants
.
ORANGE
)
return
True
elif
self
.
red_rect
.
collidepoint
(
position
):
player
.
set_color
(
constants
.
RED
)
return
True
player
.
set_color
(
constants
.
RED
)
return
True
elif
self
.
pink_rect
.
collidepoint
(
position
):
player
.
set_color
(
constants
.
PINK
)
return
True
player
.
set_color
(
constants
.
PINK
)
return
True
elif
self
.
purple_rect
.
collidepoint
(
position
):
player
.
set_color
(
constants
.
PURPLE
)
return
True
player
.
set_color
(
constants
.
PURPLE
)
return
True
elif
self
.
blue_rect
.
collidepoint
(
position
):
player
.
set_color
(
constants
.
BLUE
)
return
True
player
.
set_color
(
constants
.
BLUE
)
return
True
elif
self
.
pretty_blue_rect
.
collidepoint
(
position
):
player
.
set_color
(
constants
.
PRETTY_BLUE
)
return
True
player
.
set_color
(
constants
.
PRETTY_BLUE
)
return
True
elif
self
.
light_blue_rect
.
collidepoint
(
position
):
player
.
set_color
(
constants
.
LIGHT_BLUE
)
return
True
player
.
set_color
(
constants
.
LIGHT_BLUE
)
return
True
elif
self
.
dark_green_rect
.
collidepoint
(
position
):
player
.
set_color
(
constants
.
DARK_GREEN
)
return
True
player
.
set_color
(
constants
.
DARK_GREEN
)
return
True
elif
self
.
brown_rect
.
collidepoint
(
position
):
player
.
set_color
(
constants
.
BROWN
)
return
True
player
.
set_color
(
constants
.
BROWN
)
return
True
elif
self
.
gray_rect
.
collidepoint
(
position
):
player
.
set_color
(
constants
.
GRAY
)
return
True
player
.
set_color
(
constants
.
GRAY
)
return
True
elif
self
.
dark_gray_rect
.
collidepoint
(
position
):
player
.
set_color
(
constants
.
DARK_GRAY
)
return
True
player
.
set_color
(
constants
.
DARK_GRAY
)
return
True
else
:
return
True
return
True
else
:
return
False
return
False
def
show_menu
(
self
,
screen
)
:
pygame
.
draw
.
rect
(
screen
,
constants
.
GREEN
,
green_rect
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment