switch from ncurses to brick #1
|
@ -27,8 +27,8 @@ import Brick.Types (Widget)
|
|||
import Brick.Widgets.Core (str, vBox)
|
||||
import Control.Monad.State.Class (modify)
|
||||
import Data.Maybe (fromMaybe)
|
||||
import Lens.Micro ((^.), (.~), (%~))
|
||||
import Lens.Micro.Mtl (use)
|
||||
import Lens.Micro ((^.))
|
||||
import Lens.Micro.Mtl ((.=), (%=), use)
|
||||
|
||||
import Mtlstats.Actions
|
||||
import Mtlstats.Handlers
|
||||
|
@ -101,9 +101,9 @@ deleteC _ = Controller
|
|||
, handleController = \e -> case ynHandler e of
|
||||
Just True -> do
|
||||
use (progMode.editGoalieStateL.egsSelectedGoalie) >>= mapM_
|
||||
(\gid -> modify $ database.dbGoalies %~ dropNth gid)
|
||||
(\gid -> database.dbGoalies %= dropNth gid)
|
||||
modify edit
|
||||
Just False -> modify $ progMode.editGoalieStateL.egsMode .~ EGMenu
|
||||
Just False -> progMode.editGoalieStateL.egsMode .= EGMenu
|
||||
Nothing -> return ()
|
||||
}
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ import Brick.Types (Widget)
|
|||
import Brick.Widgets.Core (emptyWidget, str, vBox)
|
||||
import Control.Monad.State.Class (modify)
|
||||
import Data.Maybe (fromMaybe)
|
||||
import Lens.Micro ((^.), (.~), (%~))
|
||||
import Lens.Micro.Mtl (use)
|
||||
import Lens.Micro ((^.))
|
||||
import Lens.Micro.Mtl ((.=), (%=), use)
|
||||
|
||||
import Mtlstats.Actions
|
||||
import Mtlstats.Handlers
|
||||
|
@ -92,9 +92,9 @@ deleteC _ = Controller
|
|||
, handleController = \e -> case ynHandler e of
|
||||
Just True -> do
|
||||
use (progMode.editPlayerStateL.epsSelectedPlayer) >>= mapM_
|
||||
(\pid -> modify $ database.dbPlayers %~ dropNth pid)
|
||||
(\pid -> database.dbPlayers %= dropNth pid)
|
||||
modify edit
|
||||
Just False -> modify $ progMode.editPlayerStateL.epsMode .~ EPMenu
|
||||
Just False -> progMode.editPlayerStateL.epsMode .= EPMenu
|
||||
Nothing -> return ()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user