display whether or not goalie is a rookie on creation confirmation
This commit is contained in:
parent
ec10aa7998
commit
14386f9c7d
|
@ -23,11 +23,11 @@ module Mtlstats.Control.CreateGoalie (createGoalieC) where
|
||||||
|
|
||||||
import Control.Monad (join)
|
import Control.Monad (join)
|
||||||
import Control.Monad.Trans.State (gets, modify)
|
import Control.Monad.Trans.State (gets, modify)
|
||||||
import Data.Maybe (fromJust)
|
|
||||||
import Lens.Micro ((^.), (.~), (?~), (%~), to)
|
import Lens.Micro ((^.), (.~), (?~), (%~), to)
|
||||||
import qualified UI.NCurses as C
|
import qualified UI.NCurses as C
|
||||||
|
|
||||||
import Mtlstats.Actions
|
import Mtlstats.Actions
|
||||||
|
import Mtlstats.Format
|
||||||
import Mtlstats.Handlers
|
import Mtlstats.Handlers
|
||||||
import Mtlstats.Prompt
|
import Mtlstats.Prompt
|
||||||
import Mtlstats.Types
|
import Mtlstats.Types
|
||||||
|
@ -61,11 +61,14 @@ confirmCreateGoalieC = Controller
|
||||||
{ drawController = \s -> do
|
{ drawController = \s -> do
|
||||||
let cgs = s^.progMode.createGoalieStateL
|
let cgs = s^.progMode.createGoalieStateL
|
||||||
C.drawString $ unlines
|
C.drawString $ unlines
|
||||||
[ "Goalie number: " ++ show (fromJust $ cgs^.cgsNumber)
|
$ labelTable
|
||||||
, " Goalie name: " ++ cgs^.cgsName
|
[ ( "Goalie number", maybe "?" show $ cgs^.cgsNumber )
|
||||||
, ""
|
, ( "Goalie name", cgs^.cgsName )
|
||||||
, "Create goalie: are you sure? (Y/N)"
|
, ( "Rookie", maybe "?" show $ cgs^.cgsRookieFlag )
|
||||||
]
|
]
|
||||||
|
++ [ ""
|
||||||
|
, "Create goalie: are you sure? (Y/N)"
|
||||||
|
]
|
||||||
return C.CursorInvisible
|
return C.CursorInvisible
|
||||||
, handleController = \e -> do
|
, handleController = \e -> do
|
||||||
case ynHandler e of
|
case ynHandler e of
|
||||||
|
|
Loading…
Reference in New Issue
Block a user