implement position selection prompt on player creation/edit
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user