Enable sounds in menus

This commit is contained in:
2025-06-03 08:51:34 +01:00
parent 695cf3c5fd
commit e952f2abea
8 changed files with 348 additions and 326 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ module Dodge.Update.Input.ScreenLayer (
ldpVerticalSelection,
) where
import Dodge.SoundLogic.ExternallyGeneratedSounds
import Dodge.ListDisplayParams
import Control.Monad
import Data.Char
@@ -63,11 +64,11 @@ mouseClickOptionsList u = fromMaybe u $ do
mbs | mbs ^. at ButtonLeft == Just 0 -> do
i <- u ^? uvWorld . input . mouseContext . mcoMenuClick
f <- sl ^? ix i . siPayload . _1
return $ f u
return $ f u & uvSoundQueue .:~ click1S
mbs | mbs ^. at ButtonRight == Just 0 -> do
i <- u ^? uvWorld . input . mouseContext . mcoMenuClick
f <- sl ^? ix i . siPayload . _2
return $ f u
return $ f u & uvSoundQueue .:~ click1S
_ -> Nothing
ldpVerticalSelection :: Configuration -> ListDisplayParams -> Point2 -> Maybe Int