Work on saving/loading concurrently
This commit is contained in:
@@ -3,10 +3,10 @@ module Dodge.Render.MenuScreen (
|
||||
menuScreen,
|
||||
) where
|
||||
|
||||
import Dodge.ScodeToChar
|
||||
import qualified Data.Text as T
|
||||
import Dodge.Base.Window
|
||||
import Dodge.Data.Universe
|
||||
import Dodge.Menu
|
||||
import Dodge.WindowLayout
|
||||
import Padding
|
||||
import Picture
|
||||
@@ -15,9 +15,9 @@ menuScreen :: Universe -> ScreenLayer -> Picture
|
||||
menuScreen w screen = case screen of
|
||||
OptionScreen{_scTitle = titf, _scOptions = mos, _scOptionsOffset = off} ->
|
||||
drawOptions w (titf w) mos off "Use keys to navigate the menu"
|
||||
(WaitScreen sf _) -> drawOptions w (sf w) [] 0 ""
|
||||
-- (WaitScreen sf _) -> drawOptions w (sf w) [] 0 ""
|
||||
(InputScreen inputstr help) -> drawOptions w ('>' : T.unpack inputstr) [] 0 help
|
||||
(DisplayScreen sd) -> sd w
|
||||
-- (DisplayScreen sd) -> sd w
|
||||
(ColumnsScreen titf pairs) -> drawTwoColumnsScreen (_uvConfig w) (titf w) pairs
|
||||
|
||||
--displayStringList :: World -> [String] -> Picture
|
||||
|
||||
@@ -2,18 +2,19 @@ module Dodge.Render.Picture (
|
||||
fixedCoordPictures,
|
||||
) where
|
||||
|
||||
import Dodge.Base.Window
|
||||
import Dodge.Render.List
|
||||
import Dodge.Base.WinScale
|
||||
import Dodge.Base.Window
|
||||
import Dodge.Data.Universe
|
||||
import Dodge.Render.HUD
|
||||
import Dodge.Render.List
|
||||
import Dodge.Render.MenuScreen
|
||||
import Geometry
|
||||
import Picture
|
||||
import Control.Lens
|
||||
|
||||
fixedCoordPictures :: Universe -> Picture
|
||||
fixedCoordPictures u =
|
||||
drawConcurrentMessage u <> case _menuLayers u of
|
||||
drawConcurrentMessage u <> case u ^. uvScreenLayers of
|
||||
[] ->
|
||||
pictures
|
||||
[ hudDrawings u
|
||||
@@ -25,9 +26,20 @@ fixedCoordPictures u =
|
||||
cfig = _uvConfig u
|
||||
|
||||
drawConcurrentMessage :: Universe -> Picture
|
||||
drawConcurrentMessage uv = listPicturesAt (halfWidth cfig) (_windowY cfig - 50) cfig [text (_uvConcMessage uv)]
|
||||
drawConcurrentMessage u = case u ^. uvConcEffects of
|
||||
BlockingConcEffect str -> listPicturesAt
|
||||
(halfWidth cfig)
|
||||
(halfHeight cfig)
|
||||
cfig
|
||||
[text str]
|
||||
BackgroundConcEffect str -> listPicturesAt
|
||||
(halfWidth cfig)
|
||||
(_windowY cfig - 50)
|
||||
cfig
|
||||
[text str]
|
||||
_ -> mempty
|
||||
where
|
||||
cfig = _uvConfig uv
|
||||
cfig = _uvConfig u
|
||||
|
||||
customMouseCursor :: Configuration -> World -> Picture
|
||||
customMouseCursor cfig w =
|
||||
|
||||
Reference in New Issue
Block a user