diff --git a/src/Mtlstats/Menu/EditGoalie.hs b/src/Mtlstats/Menu/EditGoalie.hs index 375e6c7..fae6caf 100644 --- a/src/Mtlstats/Menu/EditGoalie.hs +++ b/src/Mtlstats/Menu/EditGoalie.hs @@ -40,15 +40,17 @@ editGoalieMenu = Menu "*** EDIT GOALTENDER ***" () $ map -- key, label, value [ ( '1', "Edit number", set EGNumber ) , ( '2', "Edit name", set EGName ) - , ( '3', "Toggle rookie flag", toggle ) - , ( '4', "Edit YTD stats", set EGYtd ) - , ( '5', "Edit Lifetime stats", set EGLifetime ) + , ( '3', "Toggle rookie flag", toggleRookie ) + , ( '4', "Toggle active flag", toggleActive ) + , ( '5', "Edit YTD stats", set EGYtd ) + , ( '6', "Edit Lifetime stats", set EGLifetime ) , ( 'R', "Return to Edit Menu", edit ) ] where - set mode = progMode.editGoalieStateL.egsMode .~ mode - toggle = editSelectedGoalie (gRookie %~ not) + set mode = progMode.editGoalieStateL.egsMode .~ mode + toggleRookie = editSelectedGoalie (gRookie %~ not) + toggleActive = editSelectedGoalie (gActive %~ not) -- | The 'Goalie' YTD edit menu editGoalieYtdMenu :: Menu () diff --git a/src/Mtlstats/Menu/EditPlayer.hs b/src/Mtlstats/Menu/EditPlayer.hs index 0d7a9f6..69c25fe 100644 --- a/src/Mtlstats/Menu/EditPlayer.hs +++ b/src/Mtlstats/Menu/EditPlayer.hs @@ -41,15 +41,17 @@ editPlayerMenu = Menu "*** EDIT PLAYER ***" () $ map [ ( '1', "Edit number", set EPNumber ) , ( '2', "Edit name", set EPName ) , ( '3', "Edit position", set EPPosition ) - , ( '4', "Toggle rookie flag", toggle ) - , ( '5', "Edit YTD stats", set EPYtd ) - , ( '6', "Edit lifetime stats", set EPLifetime ) + , ( '4', "Toggle rookie flag", toggleRookie ) + , ( '5', "Toggle active flag", toggleActive ) + , ( '6', "Edit YTD stats", set EPYtd ) + , ( '7', "Edit lifetime stats", set EPLifetime ) , ( 'R', "Return to Edit Menu", edit ) ] where - set mode = progMode.editPlayerStateL.epsMode .~ mode - toggle = editSelectedPlayer $ pRookie %~ not + set mode = progMode.editPlayerStateL.epsMode .~ mode + toggleRookie = editSelectedPlayer $ pRookie %~ not + toggleActive = editSelectedPlayer $ pActive %~ not -- | The 'Player' YTD stats edit menu editPlayerYtdMenu :: Menu ()