prompt for player name

This commit is contained in:
Jonathan Lamothe
2019-09-09 22:50:44 -04:00
parent 754b3dd25c
commit 57ac90038a
2 changed files with 16 additions and 1 deletions

View File

@@ -55,6 +55,7 @@ dispatch s = case s^.progMode of
| otherwise -> reportC
CreatePlayer cps
| null $ cps^.cpsNumber -> getPlayerNumC
| null $ cps^.cpsName -> getPlayerNameC
| otherwise -> undefined
mainMenuC :: Controller
@@ -205,3 +206,11 @@ getPlayerNumC = Controller
promptHandler playerNumPrompt e
return True
}
getPlayerNameC :: Controller
getPlayerNameC = Controller
{ drawController = drawPrompt playerNamePrompt
, handleController = \e -> do
promptHandler playerNamePrompt e
return True
}