From 31fc032c275a9f3a5641b7cfac92a07237fd7be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Boutonn=C3=A9?= Date: Tue, 1 Feb 2011 20:45:22 +0000 Subject: [PATCH] HUGO: in the menu, show modified button before closing the menu, with a short delay. Thanks _sev for the help! svn-id: r55710 --- engines/hugo/menu.cpp | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/engines/hugo/menu.cpp b/engines/hugo/menu.cpp index cd70fc10566..0af77a089eb 100644 --- a/engines/hugo/menu.cpp +++ b/engines/hugo/menu.cpp @@ -23,14 +23,16 @@ * */ +#include "common/substream.h" +#include "graphics/imagedec.h" +#include "gui/gui-manager.h" + #include "hugo/hugo.h" #include "hugo/display.h" #include "hugo/parser.h" #include "hugo/schedule.h" #include "hugo/sound.h" #include "hugo/util.h" -#include "graphics/imagedec.h" -#include "common/substream.h" namespace Hugo { @@ -188,12 +190,22 @@ void TopMenu::handleCommand(GUI::CommandSender *sender, uint32 command, uint32 d _vm->_file->instructions(); break; case kCmdMusic: - close(); _vm->_sound->toggleMusic(); + _musicButton->setGfx(arrayBmp[4 * kMenuMusic + (g_system->getOverlayWidth() > 320 ? 2 : 1) - 1 + ((_vm->_config.musicFl) ? 0 : 2)]); + _musicButton->draw(); + g_gui.theme()->updateScreen(); + g_system->updateScreen(); + g_system->delayMillis(500); + close(); break; case kCmdSoundFX: - close(); _vm->_sound->toggleSound(); + reflowLayout(); + _soundFXButton->draw(); + g_gui.theme()->updateScreen(); + g_system->updateScreen(); + g_system->delayMillis(500); + close(); break; case kCmdLoad: close(); @@ -215,8 +227,13 @@ void TopMenu::handleCommand(GUI::CommandSender *sender, uint32 command, uint32 d _vm->getGameStatus().recallFl = true; break; case kCmdTurbo: - close(); _vm->_parser->switchTurbo(); + reflowLayout(); + _turboButton->draw(); + g_gui.theme()->updateScreen(); + g_system->updateScreen(); + g_system->delayMillis(500); + close(); break; case kCmdLook: close();