implemented Mtlstats.Control.EditPlayer.selectPlayerC

This commit is contained in:
Jonathan Lamothe
2019-11-01 03:05:40 -04:00
parent b19f1386ec
commit e754d887c5
2 changed files with 12 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ module Mtlstats.Control.EditPlayer (editPlayer) where
import Lens.Micro ((^.)) import Lens.Micro ((^.))
import Mtlstats.Prompt
import Mtlstats.Types import Mtlstats.Types
-- | Dispatcher/controller for the player edit mode -- | Dispatcher/controller for the player edit mode
@@ -32,4 +33,9 @@ editPlayer eps
| otherwise = undefined | otherwise = undefined
selectPlayerC :: Controller selectPlayerC :: Controller
selectPlayerC = undefined selectPlayerC = Controller
{ drawController = drawPrompt playerToEditPrompt
, handleController = \e -> do
promptHandler playerToEditPrompt e
return True
}

View File

@@ -47,7 +47,8 @@ module Mtlstats.Prompt (
goalieNamePrompt, goalieNamePrompt,
selectGameGoaliePrompt, selectGameGoaliePrompt,
goalieMinsPlayedPrompt, goalieMinsPlayedPrompt,
goalsAllowedPrompt goalsAllowedPrompt,
playerToEditPrompt
) where ) where
import Control.Monad (when) import Control.Monad (when)
@@ -327,5 +328,8 @@ goalsAllowedPrompt = numPrompt "Goals allowed: " $ \n -> do
modify $ progMode.gameStateL.goaliesRecorded .~ True modify $ progMode.gameStateL.goaliesRecorded .~ True
modify recordGoalieStats modify recordGoalieStats
playerToEditPrompt :: Prompt
playerToEditPrompt = undefined
drawSimplePrompt :: String -> ProgState -> C.Update () drawSimplePrompt :: String -> ProgState -> C.Update ()
drawSimplePrompt pStr s = C.drawString $ pStr ++ s^.inputBuffer drawSimplePrompt pStr s = C.drawString $ pStr ++ s^.inputBuffer