implemented lifetime assists editing
This commit is contained in:
@@ -127,7 +127,12 @@ ltGoalsC = Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
ltAssistsC :: Controller
|
ltAssistsC :: Controller
|
||||||
ltAssistsC = undefined
|
ltAssistsC = Controller
|
||||||
|
{ drawController = drawPrompt editPlayerLtAssistsPrompt
|
||||||
|
, handleController = \e -> do
|
||||||
|
promptHandler editPlayerLtAssistsPrompt e
|
||||||
|
return True
|
||||||
|
}
|
||||||
|
|
||||||
ltPMinC :: Controller
|
ltPMinC :: Controller
|
||||||
ltPMinC = undefined
|
ltPMinC = undefined
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ module Mtlstats.Prompt.EditPlayer
|
|||||||
, editPlayerYtdAssistsPrompt
|
, editPlayerYtdAssistsPrompt
|
||||||
, editPlayerYtdPMinPrompt
|
, editPlayerYtdPMinPrompt
|
||||||
, editPlayerLtGoalsPrompt
|
, editPlayerLtGoalsPrompt
|
||||||
|
, editPlayerLtAssistsPrompt
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Monad.Extra (whenJustM)
|
import Control.Monad.Extra (whenJustM)
|
||||||
@@ -72,6 +73,11 @@ editPlayerLtGoalsPrompt :: Prompt
|
|||||||
editPlayerLtGoalsPrompt = numPrompt "Lifetime goals: " $
|
editPlayerLtGoalsPrompt = numPrompt "Lifetime goals: " $
|
||||||
editPlayer . (pLifetime.psGoals .~)
|
editPlayer . (pLifetime.psGoals .~)
|
||||||
|
|
||||||
|
-- | Prompt to edit a player's lifetime assists
|
||||||
|
editPlayerLtAssistsPrompt :: Prompt
|
||||||
|
editPlayerLtAssistsPrompt = numPrompt "Lifetime assists: " $
|
||||||
|
editPlayer . (pLifetime.psAssists .~)
|
||||||
|
|
||||||
editPlayer :: (Player -> Player) -> Action ()
|
editPlayer :: (Player -> Player) -> Action ()
|
||||||
editPlayer f =
|
editPlayer f =
|
||||||
whenJustM (gets (^.progMode.editPlayerStateL.epsSelectedPlayer)) $ \pid ->
|
whenJustM (gets (^.progMode.editPlayerStateL.epsSelectedPlayer)) $ \pid ->
|
||||||
|
|||||||
Reference in New Issue
Block a user