[Scummvm-git-logs] scummvm master -> e3a626316eba031ba0b6cdeded365921974fa0e5
mduggan
noreply at scummvm.org
Tue Dec 31 08:20:11 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
e3a626316e DGDS: Fix Willy Beamish sfx/music toggle button display
Commit: e3a626316eba031ba0b6cdeded365921974fa0e5
https://github.com/scummvm/scummvm/commit/e3a626316eba031ba0b6cdeded365921974fa0e5
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2024-12-31T19:19:46+11:00
Commit Message:
DGDS: Fix Willy Beamish sfx/music toggle button display
Changed paths:
engines/dgds/menu.cpp
engines/dgds/request.cpp
diff --git a/engines/dgds/menu.cpp b/engines/dgds/menu.cpp
index 123f41ec337..a513c313f56 100644
--- a/engines/dgds/menu.cpp
+++ b/engines/dgds/menu.cpp
@@ -481,8 +481,9 @@ void Menu::onMouseLUp(const Common::Point &mouse) {
if (_curMenu == kMenuOptions)
isToggle = updateOptionsGadget(gadget);
drawMenu(_curMenu);
- g_system->delayMillis(500);
+ g_system->delayMillis(300);
gadget->toggle(true);
+ isToggle = true;
}
if (_curMenu == kMenuOptions)
diff --git a/engines/dgds/request.cpp b/engines/dgds/request.cpp
index 140d818b33b..1ed0046c6e7 100644
--- a/engines/dgds/request.cpp
+++ b/engines/dgds/request.cpp
@@ -24,6 +24,8 @@
#include "common/file.h"
#include "common/rect.h"
+#include "audio/mixer.h"
+
#include "graphics/surface.h"
#include "dgds/dgds.h"
@@ -546,12 +548,16 @@ void ButtonGadget::drawWillyBmpButtons(Graphics::ManagedSurface *dst) const {
case 114: // HELP (questionmark icon)
drawCenteredBmpIcon(dst, kWillyQuestionMark);
break;
- case 115: // SFX (bam icon)
- drawCenteredBmpIcon(dst, kWillyBam);
+ case 115: { // SFX (bam icon)
+ bool sfxOff = DgdsEngine::getInstance()->_mixer->isSoundTypeMuted(Audio::Mixer::kSFXSoundType);
+ drawCenteredBmpIcon(dst, sfxOff ? kWillyNoBam : kWillyBam);
break;
- case 116: // MUSIC (musical note icon)
- drawCenteredBmpIcon(dst, kWillyMusicNote);
+ }
+ case 116: { // MUSIC (musical note icon)
+ bool musicOff = DgdsEngine::getInstance()->_mixer->isSoundTypeMuted(Audio::Mixer::kMusicSoundType);
+ drawCenteredBmpIcon(dst, musicOff ? kWillyNoMusicNote : kWillyMusicNote);
break;
+ }
case 120: // HELP (questionmark and text icon)
drawCenteredBmpIcon(dst, kWillyHelpText);
break;
More information about the Scummvm-git-logs
mailing list