modules/menusystem: add a function to reset menus' sound state
This commit is contained in:
parent
d1c2f8634b
commit
51ea3629d0
1 changed files with 7 additions and 3 deletions
|
@ -58,9 +58,7 @@ function Menu:new(menusystem, name, x, y, w, h)
|
|||
|
||||
self.depth = 0
|
||||
|
||||
self.sound = {}
|
||||
self.sound.asset = nil
|
||||
self.sound.active = false
|
||||
self:resetSound()
|
||||
|
||||
self:register()
|
||||
end
|
||||
|
@ -252,6 +250,12 @@ end
|
|||
-- SOUND FUNCTION
|
||||
-- Handle SFX
|
||||
|
||||
function Menu:resetSound()
|
||||
self.sound = {}
|
||||
self.sound.active = true
|
||||
self.sound.asset = nil
|
||||
end
|
||||
|
||||
function Menu:setSound(soundasset)
|
||||
self.sound.active = true
|
||||
self.sound.asset = soundasset
|
||||
|
|
Loading…
Reference in a new issue