Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation2/data/gui/scripts/NewAudioMenu.lua @ 6191

Last change on this file since 6191 was 6186, checked in by dafrick, 15 years ago

Some cleanup in SoundManager and related classes. Overrall volume works now. Mute function has been implemented into the gui.
Once again you'll have to delete your orxonox.ini file to be trouble free.

  • Property svn:executable set to *
File size: 940 bytes
Line 
1-- NewAudioMenu.lua
2
3BasicGUI = require("BasicGUI")
4local P = BasicGUI:new() --inherit everything from the gui package
5if _REQUIREDNAME == nil then
6    NewAudioMenu = P
7else
8    _G[_REQUIREDNAME] = P
9end
10
11P.filename = "NewAudioMenu"
12P.layoutString = "NewAudioMenu.layout"
13
14function P.AudioMusicScrollbar_clicked(e)
15    -- music volume
16    debug("event: music volume")
17end
18
19function P.AudioSoundScrollbar_clicked(e)
20    -- sound volume
21    debug("event: sound volume")
22end
23
24function P.AudioMuteMusicCheckbox_clicked(e)
25    soundMgr = orxonox.SoundManager:getInstance()
26    soundMgr:toggleMute(orxonox.SoundType.ambient)
27    debug("event: mute music")
28end
29
30function P.AudioMuteSoundCheckbox_clicked(e)
31    soundMgr = orxonox.SoundManager:getInstance()
32    soundMgr:toggleMute(orxonox.SoundType.none)
33    debug("event: mute sound")
34end
35
36function P.AudioBackButton_clicked(e)
37    hideGUI("NewAudioMenu")
38    debug("event: back")
39end
40
41return P
42
Note: See TracBrowser for help on using the repository browser.