Add text messages on loading screens
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
module Dodge.Render.MenuScreen (drawMenuScreen) where
|
||||
|
||||
import Geometry.Polygon
|
||||
import Linear
|
||||
import Dodge.Data.ScreenPos
|
||||
import Control.Lens
|
||||
import Dodge.Base.Window
|
||||
import Dodge.Data.CardinalPoint
|
||||
@@ -15,6 +18,15 @@ drawMenuScreen :: Maybe Int -> ScreenLayer -> Config -> Picture
|
||||
drawMenuScreen mi = \case
|
||||
OptionScreen{_scTitle = s, _scSelectionList = l} -> drawOptions s mi l
|
||||
InputScreen inputstr -> drawInputMenu ('>' : inputstr)
|
||||
LoadingScreen ss t -> drawLoadingScreen ss t
|
||||
|
||||
drawLoadingScreen :: [String] -> BlockStatus -> Config -> Picture
|
||||
drawLoadingScreen s _ cfig =
|
||||
polygon (rectWH (fromIntegral (cfig ^.windowX)) (fromIntegral (cfig ^. windowY))) <>
|
||||
translateScreenPos cfig
|
||||
(ScreenPos (V2 0 0.2) (V2 (-300) (10 * fromIntegral (length s))))
|
||||
(drawList $ map text s -- <> [text $ show t])
|
||||
)
|
||||
|
||||
drawInputMenu :: String -> Config -> Picture
|
||||
drawInputMenu s cf = darkenBackground cf <> drawTitle cf s
|
||||
|
||||
Reference in New Issue
Block a user