implement position selection prompt on player creation/edit

This commit is contained in:
Jonathan Lamothe committed 2020-02-13 01:58:59 -05:00
1 parent b9d8b263df
commit dfd226c7bd
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -238,7 +238,7 @@ playerNamePrompt = namePrompt "Player name: " $
-- | Prompts for a new player's position -- | Prompts for a new player's position
playerPosPrompt :: Prompt playerPosPrompt :: Prompt
playerPosPrompt = ucStrPrompt "Player position: " $ playerPosPrompt = selectPositionPrompt "Player position: " $
modify . (progMode.createPlayerStateL.cpsPosition .~) modify . (progMode.createPlayerStateL.cpsPosition .~)
-- | Prompts tor the goalie's number -- | Prompts tor the goalie's number
+1 -1
View File
@@ -62,7 +62,7 @@ editPlayerPosPrompt
:: Action () :: Action ()
-- ^ The action to be performed upon completion -- ^ The action to be performed upon completion
-> Prompt -> Prompt
editPlayerPosPrompt callback = ucStrPrompt "Player position: " $ \pos -> do editPlayerPosPrompt callback = selectPositionPrompt "Player position: " $ \pos -> do
if null pos if null pos
then goto EPMenu then goto EPMenu
else doEdit EPMenu $ pPosition .~ pos else doEdit EPMenu $ pPosition .~ pos