prompt for day of month game took place
This commit is contained in:
parent
bd0cffc56c
commit
eef773b7fa
|
@ -49,6 +49,9 @@ handleEvent e = gets (view progMode) >>= \case
|
|||
| null $ gs^.gameMonth -> do
|
||||
menuHandler gameMonthMenu e
|
||||
return True
|
||||
| null $ gs^.gameDay -> do
|
||||
promptHandler gameDayPrompt e
|
||||
return True
|
||||
| null $ gs^.gameType -> do
|
||||
menuHandler gameTypeMenu e
|
||||
return True
|
||||
|
|
|
@ -27,6 +27,7 @@ module Mtlstats.Prompt (
|
|||
numPrompt,
|
||||
-- * Individual prompts
|
||||
gameYearPrompt,
|
||||
gameDayPrompt,
|
||||
otherTeamPrompt,
|
||||
homeScorePrompt,
|
||||
awayScorePrompt
|
||||
|
@ -99,6 +100,11 @@ gameYearPrompt :: Prompt
|
|||
gameYearPrompt = numPrompt "Game year: " $
|
||||
modify . (progMode.gameStateL.gameYear ?~)
|
||||
|
||||
-- | Prompts for the day of the month the game took place
|
||||
gameDayPrompt :: Prompt
|
||||
gameDayPrompt = numPrompt "Day of month: " $
|
||||
modify . (progMode.gameStateL.gameDay ?~)
|
||||
|
||||
-- | Prompts for the other team name
|
||||
otherTeamPrompt :: Prompt
|
||||
otherTeamPrompt = strPrompt "Other team: " $
|
||||
|
|
|
@ -42,6 +42,7 @@ draw s = do
|
|||
NewGame gs
|
||||
| null $ gs^.gameYear -> drawPrompt gameYearPrompt s
|
||||
| null $ gs^.gameMonth -> drawMenu gameMonthMenu
|
||||
| null $ gs^.gameDay -> drawPrompt gameDayPrompt s
|
||||
| null $ gs^.gameType -> drawMenu gameTypeMenu
|
||||
| null $ gs^.otherTeam -> drawPrompt otherTeamPrompt s
|
||||
| null $ gs^.homeScore -> drawPrompt homeScorePrompt s
|
||||
|
|
Loading…
Reference in New Issue
Block a user