Modified main menu to be able to override the current game with a new one
This commit is contained in:
@ -24,7 +24,8 @@ class Menu:
|
||||
|
||||
|
||||
class MainMenuValues(Enum):
|
||||
START = 'Jouer'
|
||||
START = 'Nouvelle partie'
|
||||
RESUME = 'Continuer'
|
||||
SETTINGS = 'Paramètres'
|
||||
EXIT = 'Quitter'
|
||||
|
||||
@ -46,6 +47,9 @@ class MainMenu(Menu):
|
||||
if key == KeyValues.ENTER:
|
||||
option = self.validate()
|
||||
if option == MainMenuValues.START:
|
||||
game.new_game()
|
||||
game.state = GameMode.PLAY
|
||||
elif option == MainMenuValues.RESUME:
|
||||
game.state = GameMode.PLAY
|
||||
elif option == MainMenuValues.SETTINGS:
|
||||
game.state = GameMode.SETTINGS
|
||||
|
Reference in New Issue
Block a user