Add sound on spawn, allow for filtering of to play sounds

This commit is contained in:
2025-12-05 23:19:06 +00:00
parent a4f8369420
commit f9ce58b409
19 changed files with 752 additions and 695 deletions
+10 -9
View File
@@ -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