added callback to EditPlayerState

This commit is contained in:
Jonathan Lamothe 2020-01-28 00:31:55 -05:00
parent 994087a0e6
commit 79d527866f

View File

@ -98,6 +98,7 @@ module Mtlstats.Types (
-- ** EditPlayerState Lenses -- ** EditPlayerState Lenses
epsSelectedPlayer, epsSelectedPlayer,
epsMode, epsMode,
epsCallback,
-- ** EditGoalieState Lenses -- ** EditGoalieState Lenses
egsSelectedGoalie, egsSelectedGoalie,
egsMode, egsMode,
@ -350,6 +351,8 @@ data EditPlayerState = EditPlayerState
-- ^ The index number of the player being edited -- ^ The index number of the player being edited
, _epsMode :: EditPlayerMode , _epsMode :: EditPlayerMode
-- ^ The editing mode -- ^ The editing mode
, _epsCallback :: Action ()
-- ^ The action to perform when the edit is complete
} }
-- | Player editing mode -- | Player editing mode
@ -818,6 +821,7 @@ newEditPlayerState :: EditPlayerState
newEditPlayerState = EditPlayerState newEditPlayerState = EditPlayerState
{ _epsSelectedPlayer = Nothing { _epsSelectedPlayer = Nothing
, _epsMode = EPMenu , _epsMode = EPMenu
, _epsCallback = return ()
} }
-- | Constructor for an 'EditGoalieState' value -- | Constructor for an 'EditGoalieState' value