prompt for player's position

This commit is contained in:
Jonathan Lamothe
2019-09-09 22:57:36 -04:00
parent 57ac90038a
commit 0ee0451496
2 changed files with 18 additions and 3 deletions

View File

@@ -33,6 +33,7 @@ module Mtlstats.Prompt (
awayScorePrompt,
playerNumPrompt,
playerNamePrompt,
playerPosPrompt
) where
import Control.Monad (when)
@@ -132,5 +133,10 @@ playerNamePrompt :: Prompt
playerNamePrompt = strPrompt "Player name: " $
modify . (progMode.createPlayerStateL.cpsName .~)
-- | Prompts for a new player's position
playerPosPrompt :: Prompt
playerPosPrompt = strPrompt "Player position: " $
modify . (progMode.createPlayerStateL.cpsPosition .~)
drawSimplePrompt :: String -> ProgState -> C.Update ()
drawSimplePrompt pStr s = C.drawString $ pStr ++ s^.inputBuffer