Skip to content

Commit 712fcde

Browse files
committed
Safety for menu music not obeying settings.
1 parent cd1b7de commit 712fcde

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

LuaMenu/widgets/snd_music_lite.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ function widget:ActivateMenu()
143143
previousTrack = newTrack
144144
end
145145

146+
function DelayedInitialize()
147+
SetTrackVolume((WG.Chobby and WG.Chobby.Configuration and WG.Chobby.Configuration.menuMusicVolume) or 0)
148+
end
149+
146150
function widget:Initialize()
147151

148152
-- load custom game dependent music
@@ -178,6 +182,9 @@ function widget:Initialize()
178182
WG.LibLobby.lobby:AddListener("OnBattleAboutToStart", OnBattleAboutToStart)
179183

180184
WG.MusicHandler = MusicHandler
185+
186+
WG.Delay(DelayedInitialize, 0.1)
187+
WG.Delay(DelayedInitialize, 1)
181188
end
182189

183190
--------------------------------------------------------------------------------

0 commit comments

Comments
 (0)