implemented selectGameGoaliePrompt
This commit is contained in:
parent
6c634cd366
commit
faa214bf6d
|
@ -37,6 +37,7 @@ module Mtlstats.Prompt (
|
||||||
playerNamePrompt,
|
playerNamePrompt,
|
||||||
playerPosPrompt,
|
playerPosPrompt,
|
||||||
selectPlayerPrompt,
|
selectPlayerPrompt,
|
||||||
|
selectGoaliePrompt,
|
||||||
recordGoalPrompt,
|
recordGoalPrompt,
|
||||||
recordAssistPrompt,
|
recordAssistPrompt,
|
||||||
pMinPlayerPrompt,
|
pMinPlayerPrompt,
|
||||||
|
@ -204,6 +205,16 @@ selectPlayerPrompt pStr callback = Prompt
|
||||||
_ -> return ()
|
_ -> return ()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- | Selects a goalie (creating one if necessary)
|
||||||
|
selectGoaliePrompt
|
||||||
|
:: String
|
||||||
|
-- ^ The prompt string
|
||||||
|
-> (Maybe Int -> Action ())
|
||||||
|
-- ^ The callback to run (takes the index number of the goalie as
|
||||||
|
-- input)
|
||||||
|
-> Prompt
|
||||||
|
selectGoaliePrompt = undefined
|
||||||
|
|
||||||
-- | Prompts for the player who scored the goal
|
-- | Prompts for the player who scored the goal
|
||||||
recordGoalPrompt
|
recordGoalPrompt
|
||||||
:: Int
|
:: Int
|
||||||
|
@ -262,7 +273,10 @@ goalieNamePrompt = strPrompt "Goalie name: " $
|
||||||
|
|
||||||
-- | Prompts for a goalie who played in the game
|
-- | Prompts for a goalie who played in the game
|
||||||
selectGameGoaliePrompt :: Prompt
|
selectGameGoaliePrompt :: Prompt
|
||||||
selectGameGoaliePrompt = undefined
|
selectGameGoaliePrompt = selectGoaliePrompt "Select goalie: " $
|
||||||
|
\case
|
||||||
|
Nothing -> modify $ progMode.gameStateL.goaliesRecorded .~ True
|
||||||
|
Just n -> modify $ progMode.gameStateL.gameSelectedGoalie ?~ n
|
||||||
|
|
||||||
drawSimplePrompt :: String -> ProgState -> C.Update ()
|
drawSimplePrompt :: String -> ProgState -> C.Update ()
|
||||||
drawSimplePrompt pStr s = C.drawString $ pStr ++ s^.inputBuffer
|
drawSimplePrompt pStr s = C.drawString $ pStr ++ s^.inputBuffer
|
||||||
|
|
Loading…
Reference in New Issue
Block a user