implemented lifetime penalty minutes editing
This commit is contained in:
parent
a07c8a0242
commit
b57f12310b
|
@ -135,4 +135,9 @@ ltAssistsC = Controller
|
|||
}
|
||||
|
||||
ltPMinC :: Controller
|
||||
ltPMinC = undefined
|
||||
ltPMinC = Controller
|
||||
{ drawController = drawPrompt editPlayerLtPMinPrompt
|
||||
, handleController = \e -> do
|
||||
promptHandler editPlayerLtPMinPrompt e
|
||||
return True
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ module Mtlstats.Prompt.EditPlayer
|
|||
, editPlayerYtdPMinPrompt
|
||||
, editPlayerLtGoalsPrompt
|
||||
, editPlayerLtAssistsPrompt
|
||||
, editPlayerLtPMinPrompt
|
||||
) where
|
||||
|
||||
import Control.Monad.Extra (whenJustM)
|
||||
|
@ -78,6 +79,11 @@ editPlayerLtAssistsPrompt :: Prompt
|
|||
editPlayerLtAssistsPrompt = numPrompt "Lifetime assists: " $
|
||||
editPlayer . (pLifetime.psAssists .~)
|
||||
|
||||
-- | Prompt to edit a player's lifetime penalty minutes
|
||||
editPlayerLtPMinPrompt :: Prompt
|
||||
editPlayerLtPMinPrompt = numPrompt "Lifetime penalty minutes: " $
|
||||
editPlayer . (pLifetime.psPMin .~)
|
||||
|
||||
editPlayer :: (Player -> Player) -> Action ()
|
||||
editPlayer f =
|
||||
whenJustM (gets (^.progMode.editPlayerStateL.epsSelectedPlayer)) $ \pid ->
|
||||
|
|
Loading…
Reference in New Issue
Block a user