prompt for player name
This commit is contained in:
@@ -31,7 +31,8 @@ module Mtlstats.Prompt (
|
||||
otherTeamPrompt,
|
||||
homeScorePrompt,
|
||||
awayScorePrompt,
|
||||
playerNumPrompt
|
||||
playerNumPrompt,
|
||||
playerNamePrompt,
|
||||
) where
|
||||
|
||||
import Control.Monad (when)
|
||||
@@ -126,5 +127,10 @@ playerNumPrompt :: Prompt
|
||||
playerNumPrompt = numPrompt "Player number: " $
|
||||
modify . (progMode.createPlayerStateL.cpsNumber ?~)
|
||||
|
||||
-- | Prompts for a new player's name
|
||||
playerNamePrompt :: Prompt
|
||||
playerNamePrompt = strPrompt "Player name: " $
|
||||
modify . (progMode.createPlayerStateL.cpsName .~)
|
||||
|
||||
drawSimplePrompt :: String -> ProgState -> C.Update ()
|
||||
drawSimplePrompt pStr s = C.drawString $ pStr ++ s^.inputBuffer
|
||||
|
||||
Reference in New Issue
Block a user