added title screen logic branch
This commit is contained in:
parent
be9d7d80bb
commit
45aea607b2
|
@ -29,6 +29,7 @@ import Lens.Micro.Extras (view)
|
|||
import qualified UI.NCurses as C
|
||||
|
||||
import Mtlstats.Actions
|
||||
import Mtlstats.Control.TitleScreen
|
||||
import Mtlstats.Control.EditGoalie
|
||||
import Mtlstats.Control.EditPlayer
|
||||
import Mtlstats.Control.EditStandings
|
||||
|
@ -42,6 +43,7 @@ import Mtlstats.Types
|
|||
-- run
|
||||
dispatch :: ProgState -> Controller
|
||||
dispatch s = case s^.progMode of
|
||||
TitleScreen -> titleScreenC
|
||||
MainMenu -> mainMenuC
|
||||
NewSeason flag -> newSeasonC flag
|
||||
NewGame gs -> newGameC gs
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
{- |
|
||||
|
||||
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.Control.TitleScreen (titleScreenC) where
|
||||
|
||||
import Mtlstats.Types
|
||||
|
||||
titleScreenC :: Controller
|
||||
titleScreenC = undefined
|
|
@ -236,7 +236,8 @@ data ProgState = ProgState
|
|||
|
||||
-- | The program mode
|
||||
data ProgMode
|
||||
= MainMenu
|
||||
= TitleScreen
|
||||
| MainMenu
|
||||
| NewSeason Bool
|
||||
| NewGame GameState
|
||||
| EditMenu
|
||||
|
@ -247,6 +248,7 @@ data ProgMode
|
|||
| EditStandings EditStandingsMode
|
||||
|
||||
instance Show ProgMode where
|
||||
show TitleScreen = "TitleScreen"
|
||||
show MainMenu = "MainMenu"
|
||||
show (NewSeason _) = "NewSeason"
|
||||
show (NewGame _) = "NewGame"
|
||||
|
@ -760,7 +762,7 @@ esmSubModeL = lens
|
|||
newProgState :: ProgState
|
||||
newProgState = ProgState
|
||||
{ _database = newDatabase
|
||||
, _progMode = MainMenu
|
||||
, _progMode = TitleScreen
|
||||
, _inputBuffer = ""
|
||||
, _scrollOffset = 0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user