implemented setHomeGame and setAwayGame

This commit is contained in:
Jonathan Lamothe
2019-08-22 02:37:47 -04:00
parent c300542635
commit 87eb2b9f16
4 changed files with 70 additions and 8 deletions

View File

@@ -25,11 +25,12 @@ module Mtlstats.Menu (
menuHandler,
-- * Menus
mainMenu,
newSeasonMenu
newSeasonMenu,
gameTypeMenu
) where
import Control.Monad.Trans.State (StateT, modify)
import Lens.Micro ((^.))
import Lens.Micro ((^.), (.~))
import qualified UI.NCurses as C
import Mtlstats.Actions
@@ -67,3 +68,12 @@ newSeasonMenu = Menu "*** SEASON TYPE ***" ()
, MenuItem '2' "Playoffs" $
modify startNewGame
]
-- | The game type menu (home/away)
gameTypeMenu :: Menu ()
gameTypeMenu = Menu "*** GAME TYPE ***" ()
[ MenuItem '1' "Home Game" $
modify setHomeGame
, MenuItem '2' "Away Game" $
modify setAwayGame
]