implemented Mtlstats.Control.EditGoalie.menuC

This commit is contained in:
Jonathan Lamothe 2019-11-11 20:47:50 -05:00
parent 3dfbfe7090
commit e1f92ce92e
2 changed files with 17 additions and 1 deletions

View File

@ -24,7 +24,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
module Mtlstats.Control.EditGoalie (editGoalieC) where
import Lens.Micro ((^.))
import UI.NCurses as C
import Mtlstats.Menu
import Mtlstats.Prompt
import Mtlstats.Prompt.EditGoalie
import Mtlstats.Types
@ -57,7 +59,7 @@ editC = \case
EGLtTies -> ltTiesC
menuC :: Controller
menuC = undefined
menuC = menuControllerWith header editGoalieMenu
numberC :: Controller
numberC = undefined
@ -100,3 +102,6 @@ ltLossesC = undefined
ltTiesC :: Controller
ltTiesC = undefined
header :: ProgState -> C.Update ()
header = undefined

View File

@ -22,6 +22,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
module Mtlstats.Menu (
-- * Menu Functions
menuController,
menuControllerWith,
drawMenu,
menuHandler,
-- * Menus
@ -65,6 +66,16 @@ menuController menu = Controller
return True
}
-- | Generate a simple 'Controller' for a 'Menu' with a header
menuControllerWith
:: (ProgState -> C.Update ())
-- ^ Generates the header
-> Menu ()
-- ^ The menu
-> Controller
-- ^ The resulting controller
menuControllerWith = undefined
-- | The draw function for a 'Menu'
drawMenu :: Menu a -> C.Update C.CursorMode
drawMenu m = do