implemented editHomeStandingsC and editAwayStandingsC

This commit is contained in:
Jonathan Lamothe 2020-01-16 20:37:31 -05:00
parent 717f2d5932
commit dcbd68cdda
2 changed files with 86 additions and 4 deletions

View File

@ -29,7 +29,10 @@ import qualified UI.NCurses as C
import Mtlstats.Format
import Mtlstats.Menu
import Mtlstats.Menu.EditStandings
import Mtlstats.Prompt
import Mtlstats.Prompt.EditStandings
import Mtlstats.Types
import Mtlstats.Types.Menu
-- | Controller for the edit standings menu
editStandingsC :: EditStandingsMode -> Controller
@ -40,13 +43,27 @@ editStandingsC = \case
editHomeStandingsC :: ESMSubMode -> Controller
editHomeStandingsC = \case
ESMSubMenu -> menuControllerWith header editHomeStandingsMenu
_ -> undefined
ESMSubMenu -> menuC editHomeStandingsMenu
ESMEditWins -> promptC editHomeWinsPrompt
ESMEditLosses -> promptC editHomeLossesPrompt
ESMEditOvertime -> promptC editHomeOvertimePrompt
ESMEditGoalsFor -> promptC editHomeGoalsForPrompt
ESMEditGoalsAgainst -> promptC editHomeGoalsAgainstPrompt
editAwayStandingsC :: ESMSubMode -> Controller
editAwayStandingsC = \case
ESMSubMenu -> menuControllerWith header editAwayStandingsMenu
_ -> undefined
ESMSubMenu -> menuC editAwayStandingsMenu
ESMEditWins -> promptC editAwayWinsPrompt
ESMEditLosses -> promptC editAwayLossesPrompt
ESMEditOvertime -> promptC editAwayOvertimePrompt
ESMEditGoalsFor -> promptC editAwayGoalsForPrompt
ESMEditGoalsAgainst -> promptC editAwayGoalsAgainstPrompt
menuC :: Menu () -> Controller
menuC = menuControllerWith header
promptC :: Prompt -> Controller
promptC = promptControllerWith header
header :: ProgState -> C.Update ()
header = do

View File

@ -0,0 +1,65 @@
{- |
mtlstats
Copyright (C) 1984, 1985, 2019, 2020 Rhéal Lamothe
<rheal.lamothe@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-}
module Mtlstats.Prompt.EditStandings
( editHomeWinsPrompt
, editHomeLossesPrompt
, editHomeOvertimePrompt
, editHomeGoalsForPrompt
, editHomeGoalsAgainstPrompt
, editAwayWinsPrompt
, editAwayLossesPrompt
, editAwayOvertimePrompt
, editAwayGoalsForPrompt
, editAwayGoalsAgainstPrompt
) where
import Mtlstats.Types
editHomeWinsPrompt :: Prompt
editHomeWinsPrompt = undefined
editHomeLossesPrompt :: Prompt
editHomeLossesPrompt = undefined
editHomeOvertimePrompt :: Prompt
editHomeOvertimePrompt = undefined
editHomeGoalsForPrompt :: Prompt
editHomeGoalsForPrompt = undefined
editHomeGoalsAgainstPrompt :: Prompt
editHomeGoalsAgainstPrompt = undefined
editAwayWinsPrompt :: Prompt
editAwayWinsPrompt = undefined
editAwayLossesPrompt :: Prompt
editAwayLossesPrompt = undefined
editAwayOvertimePrompt :: Prompt
editAwayOvertimePrompt = undefined
editAwayGoalsForPrompt :: Prompt
editAwayGoalsForPrompt = undefined
editAwayGoalsAgainstPrompt :: Prompt
editAwayGoalsAgainstPrompt = undefined