From adfff753dd3dc3295cd789df656c0e35170a0ffe Mon Sep 17 00:00:00 2001 From: Cary Sandvig Date: Thu, 3 May 2001 22:35:39 +0000 Subject: [PATCH] take turning on/off sfx into account --- direct/src/gui/GuiGlobals.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/direct/src/gui/GuiGlobals.py b/direct/src/gui/GuiGlobals.py index 7c55e9deb1..d2c42d7c28 100644 --- a/direct/src/gui/GuiGlobals.py +++ b/direct/src/gui/GuiGlobals.py @@ -40,13 +40,19 @@ def getDefaultRolloverSound(): global sndRollover if sndRollover == None: sndRollover = base.loadSfx("phase_3/audio/sfx/GUI_rollover.mp3") - return sndRollover + if base.wantSfx: + return sndRollover + else: + return None def getDefaultClickSound(): global sndClick if sndClick == None: sndClick = base.loadSfx("phase_3/audio/sfx/GUI_create_toon_fwd.mp3") - return sndClick + if base.wantSfx: + return sndClick + else: + return None def getNewRolloverFunctor(sound = None): val = None