From a9b5ada114efe4d9c99fa17ae2a825478b377e45 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Thu, 24 Oct 2019 15:53:24 -0400 Subject: [PATCH] implemented getGoalieNumC --- src/Mtlstats/Control.hs | 7 ++++++- src/Mtlstats/Prompt.hs | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Mtlstats/Control.hs b/src/Mtlstats/Control.hs index a42f4a6..11653ec 100644 --- a/src/Mtlstats/Control.hs +++ b/src/Mtlstats/Control.hs @@ -341,7 +341,12 @@ confirmCreatePlayerC = Controller } getGoalieNumC :: Controller -getGoalieNumC = undefined +getGoalieNumC = Controller + { drawController = drawPrompt goalieNumPrompt + , handleController = \e -> do + promptHandler goalieNumPrompt e + return True + } getGoalieNameC :: Controller getGoalieNameC = undefined diff --git a/src/Mtlstats/Prompt.hs b/src/Mtlstats/Prompt.hs index 16570ae..f34ddc5 100644 --- a/src/Mtlstats/Prompt.hs +++ b/src/Mtlstats/Prompt.hs @@ -40,7 +40,8 @@ module Mtlstats.Prompt ( recordGoalPrompt, recordAssistPrompt, pMinPlayerPrompt, - assignPMinsPrompt + assignPMinsPrompt, + goalieNumPrompt ) where import Control.Monad (when) @@ -245,5 +246,8 @@ assignPMinsPrompt :: Prompt assignPMinsPrompt = numPrompt "Penalty minutes: " $ modify . assignPMins +goalieNumPrompt :: Prompt +goalieNumPrompt = undefined + drawSimplePrompt :: String -> ProgState -> C.Update () drawSimplePrompt pStr s = C.drawString $ pStr ++ s^.inputBuffer