From 627395c83f410bf1a627d9ccf521839e21375964 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 20 Apr 2019 17:56:18 +0200 Subject: [PATCH] modules/menusystem:add batch management functions for sounds --- gamecore/modules/menusystem/init.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gamecore/modules/menusystem/init.lua b/gamecore/modules/menusystem/init.lua index e6b4010..5a3a6d2 100644 --- a/gamecore/modules/menusystem/init.lua +++ b/gamecore/modules/menusystem/init.lua @@ -144,6 +144,18 @@ end -- SOUND FUNCTIONS -- Add sounds to every menus +function MenuSystem:setSoundFromSceneAssets(soundname) + for k,v in pairs(self.menus) do + v:setSoundFromSceneAssets(soundname) + end +end + +function MenuSystem:setSound(soundasset) + for k,v in pairs(self.menus) do + v:setSound(soundasset) + end +end + -- UPDATE FUNCTIONS -- Update the menus of the menusystem