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
|
| null $ gs^.gameMonth -> do
|
||||||
menuHandler gameMonthMenu e
|
menuHandler gameMonthMenu e
|
||||||
return True
|
return True
|
||||||
|
| null $ gs^.gameDay -> do
|
||||||
|
promptHandler gameDayPrompt e
|
||||||
|
return True
|
||||||
| null $ gs^.gameType -> do
|
| null $ gs^.gameType -> do
|
||||||
menuHandler gameTypeMenu e
|
menuHandler gameTypeMenu e
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -27,6 +27,7 @@ module Mtlstats.Prompt (
|
||||||
numPrompt,
|
numPrompt,
|
||||||
-- * Individual prompts
|
-- * Individual prompts
|
||||||
gameYearPrompt,
|
gameYearPrompt,
|
||||||
|
gameDayPrompt,
|
||||||
otherTeamPrompt,
|
otherTeamPrompt,
|
||||||
homeScorePrompt,
|
homeScorePrompt,
|
||||||
awayScorePrompt
|
awayScorePrompt
|
||||||
|
@ -99,6 +100,11 @@ gameYearPrompt :: Prompt
|
||||||
gameYearPrompt = numPrompt "Game year: " $
|
gameYearPrompt = numPrompt "Game year: " $
|
||||||
modify . (progMode.gameStateL.gameYear ?~)
|
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
|
-- | Prompts for the other team name
|
||||||
otherTeamPrompt :: Prompt
|
otherTeamPrompt :: Prompt
|
||||||
otherTeamPrompt = strPrompt "Other team: " $
|
otherTeamPrompt = strPrompt "Other team: " $
|
||||||
|
|
|
@ -42,6 +42,7 @@ draw s = do
|
||||||
NewGame gs
|
NewGame gs
|
||||||
| null $ gs^.gameYear -> drawPrompt gameYearPrompt s
|
| null $ gs^.gameYear -> drawPrompt gameYearPrompt s
|
||||||
| null $ gs^.gameMonth -> drawMenu gameMonthMenu
|
| null $ gs^.gameMonth -> drawMenu gameMonthMenu
|
||||||
|
| null $ gs^.gameDay -> drawPrompt gameDayPrompt s
|
||||||
| null $ gs^.gameType -> drawMenu gameTypeMenu
|
| null $ gs^.gameType -> drawMenu gameTypeMenu
|
||||||
| null $ gs^.otherTeam -> drawPrompt otherTeamPrompt s
|
| null $ gs^.otherTeam -> drawPrompt otherTeamPrompt s
|
||||||
| null $ gs^.homeScore -> drawPrompt homeScorePrompt s
|
| null $ gs^.homeScore -> drawPrompt homeScorePrompt s
|
||||||
|
|
Loading…
Reference in New Issue
Block a user