added EditMenu mode

This commit is contained in:
Jonathan Lamothe 2019-12-17 11:32:32 -05:00
parent be990538bc
commit 59d48ec154
2 changed files with 8 additions and 2 deletions

View File

@ -41,9 +41,10 @@ import Mtlstats.Types
-- run
dispatch :: ProgState -> Controller
dispatch s = case s^.progMode of
MainMenu -> mainMenuC
NewSeason -> newSeasonC
MainMenu -> mainMenuC
NewSeason -> newSeasonC
NewGame gs -> newGameC gs
EditMenu -> editMenuC
CreatePlayer cps
| null $ cps^.cpsNumber -> getPlayerNumC
| null $ cps^.cpsName -> getPlayerNameC
@ -70,6 +71,9 @@ newSeasonC = Controller
return True
}
editMenuC :: Controller
editMenuC = undefined
getPlayerNumC :: Controller
getPlayerNumC = Controller
{ drawController = drawPrompt playerNumPrompt

View File

@ -230,6 +230,7 @@ data ProgMode
= MainMenu
| NewSeason
| NewGame GameState
| EditMenu
| CreatePlayer CreatePlayerState
| CreateGoalie CreateGoalieState
| EditPlayer EditPlayerState
@ -239,6 +240,7 @@ instance Show ProgMode where
show MainMenu = "MainMenu"
show NewSeason = "NewSeason"
show (NewGame _) = "NewGame"
show EditMenu = "EditMenu"
show (CreatePlayer _) = "CreatePlayer"
show (CreateGoalie _) = "CreateGoalie"
show (EditPlayer _) = "EditPlayer"