From 8d6048a9fad199277e84b6e07a61316a5f540622 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 10 May 2008 18:23:11 +0000 Subject: - Added small delay to GUI_v2::getInput - Prevent kyra3 background music from stopping while menu is open svn-id: r31979 --- engines/kyra/gui_mr.cpp | 5 +++++ engines/kyra/gui_mr.h | 2 ++ engines/kyra/gui_v2.cpp | 2 ++ engines/kyra/gui_v2.h | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp index c1af41ded7..1e89e50072 100644 --- a/engines/kyra/gui_mr.cpp +++ b/engines/kyra/gui_mr.cpp @@ -704,6 +704,11 @@ void GUI_MR::flagButtonDisable(Button *button) { } } +void GUI_MR::getInput() { + _vm->musicUpdate(0); + GUI_v2::getInput(); +} + const char *GUI_MR::getMenuTitle(const Menu &menu) { if (!menu.menuNameId) return 0; diff --git a/engines/kyra/gui_mr.h b/engines/kyra/gui_mr.h index d73b21b73b..d60c2f62d9 100644 --- a/engines/kyra/gui_mr.h +++ b/engines/kyra/gui_mr.h @@ -48,6 +48,8 @@ public: int optionsButton(Button *button); private: + void getInput(); + const char *getMenuTitle(const Menu &menu); const char *getMenuItemTitle(const MenuItem &menuItem); const char *getMenuItemLabel(const MenuItem &menuItem); diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp index 0a74d27a99..5ffc4d555c 100644 --- a/engines/kyra/gui_v2.cpp +++ b/engines/kyra/gui_v2.cpp @@ -409,6 +409,8 @@ void GUI_v2::getInput() { _isOptionsMenu = false; _isDeleteMenu = false; } + + delay(10); } void GUI_v2::renewHighlight(Menu &menu) { diff --git a/engines/kyra/gui_v2.h b/engines/kyra/gui_v2.h index 4e94b58742..55b7ee6d9a 100644 --- a/engines/kyra/gui_v2.h +++ b/engines/kyra/gui_v2.h @@ -125,7 +125,7 @@ protected: virtual uint8 textFieldColor2() const = 0; virtual uint8 textFieldColor3() const = 0; protected: - void getInput(); + virtual void getInput(); Button _menuButtons[7]; Button _scrollUpButton; -- cgit v1.2.3