-
Notifications
You must be signed in to change notification settings - Fork 0
/
Menu.py
24 lines (23 loc) · 819 Bytes
/
Menu.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
import time
import pygame
from pygame.locals import *
from Global import *
from Opening import *
class Menu(Opening):
#overwrite it for menu
def OpeningScene(self, screen):
screen.blit(menu, (0,0))
select_exit = Opening(menu_exit_1, menu_exit_2, (380, 500))
select_help = Opening(help1, help2, (380, 600))
self.render()
select_exit.render()
for event in pygame.event.get():
if event.type == pygame.QUIT or (select_exit.isOver() and pygame.mouse.get_pressed()[0]):
pygame.quit()
exit()
if (self.isOver() and pygame.mouse.get_pressed()[0]) or pygame.key.get_pressed()[K_ESCAPE] :
stage_num = 11
time.sleep(0.15)
return stage_num
pygame.display.update()
return 3