From ffe9b7f87f49bd0656b0f32f64f9075753c6b048 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Wed, 9 Oct 2019 01:24:55 -0400 Subject: [PATCH] implemented pMinPlayerC --- src/Mtlstats/Control.hs | 9 ++++++++- src/Mtlstats/Prompt.hs | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Mtlstats/Control.hs b/src/Mtlstats/Control.hs index 8bd64c5..96012f0 100644 --- a/src/Mtlstats/Control.hs +++ b/src/Mtlstats/Control.hs @@ -244,7 +244,14 @@ confirmGoalDataC = Controller } pMinPlayerC :: Controller -pMinPlayerC = undefined +pMinPlayerC = Controller + { drawController = \s -> do + header s + drawPrompt pMinPlayerPrompt s + , handleController = \e -> do + promptHandler pMinPlayerPrompt e + return True + } getPMinsC :: Controller getPMinsC = undefined diff --git a/src/Mtlstats/Prompt.hs b/src/Mtlstats/Prompt.hs index dc17391..4d2a937 100644 --- a/src/Mtlstats/Prompt.hs +++ b/src/Mtlstats/Prompt.hs @@ -38,7 +38,8 @@ module Mtlstats.Prompt ( playerPosPrompt, selectPlayerPrompt, recordGoalPrompt, - recordAssistPrompt + recordAssistPrompt, + pMinPlayerPrompt ) where import Control.Monad (when) @@ -234,5 +235,8 @@ recordAssistPrompt game goal assist = selectPlayerPrompt when (nAssists >= maxAssists) $ modify $ progMode.gameStateL.confirmGoalDataFlag .~ True +pMinPlayerPrompt :: Prompt +pMinPlayerPrompt = undefined + drawSimplePrompt :: String -> ProgState -> C.Update () drawSimplePrompt pStr s = C.drawString $ pStr ++ s^.inputBuffer