Add sound on spawn, allow for filtering of to play sounds
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
{-# 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
|
||||
import Dodge.Data.ScreenPos
|
||||
import Dodge.Data.SelectionList
|
||||
import Dodge.Data.Universe
|
||||
import Dodge.ListDisplayParams
|
||||
import Dodge.Render.List
|
||||
import Dodge.ScreenPos
|
||||
import Geometry.Polygon
|
||||
import Linear
|
||||
import Picture
|
||||
|
||||
drawMenuScreen :: Maybe Int -> ScreenLayer -> Config -> Picture
|
||||
@@ -21,12 +22,12 @@ drawMenuScreen mi = \case
|
||||
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])
|
||||
)
|
||||
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)
|
||||
|
||||
drawInputMenu :: String -> Config -> Picture
|
||||
drawInputMenu s cf = darkenBackground cf <> drawTitle cf s
|
||||
|
||||
Reference in New Issue
Block a user