diff options
author | Torbjörn Andersson | 2006-11-19 18:54:06 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-11-19 18:54:06 +0000 |
commit | 50e2cf9caa0d6568ac0eac2ffb1cb0f637c13220 (patch) | |
tree | aee9d5a017b346eed49a8d4cc2ae1a693c51df57 /engines | |
parent | 39b27ed3bb3f8d54d988afd6de147ede518ca4bd (diff) | |
download | scummvm-rg350-50e2cf9caa0d6568ac0eac2ffb1cb0f637c13220.tar.gz scummvm-rg350-50e2cf9caa0d6568ac0eac2ffb1cb0f637c13220.tar.bz2 scummvm-rg350-50e2cf9caa0d6568ac0eac2ffb1cb0f637c13220.zip |
Don't allow the F9 and F10 keys to open menus if a menu is already open. (Might
need more testing.)
svn-id: r24747
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cine/main_loop.cpp | 5 | ||||
-rw-r--r-- | engines/cine/various.cpp | 11 | ||||
-rw-r--r-- | engines/cine/various.h | 1 |
3 files changed, 14 insertions, 3 deletions
diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp index 6b53012171..f07db1c6c3 100644 --- a/engines/cine/main_loop.cpp +++ b/engines/cine/main_loop.cpp @@ -113,13 +113,13 @@ void manageEvents(int count) { } break; case 290: // F9 - if (allowPlayerInput) { + if (allowPlayerInput && !inMenu) { makeActionMenu(); makeCommandLine(); } break; case 291: // F10 - if (allowPlayerInput) { + if (allowPlayerInput && !inMenu) { g_cine->makeSystemMenu(); } break; @@ -207,6 +207,7 @@ void mainLoop(int bootScriptIdx) { gfxFuncGen2(); quitFlag = 0; + inMenu = false; allowPlayerInput = 0; checkForPendingDataLoadSwitch = 0; diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp index 4347c7b27a..853f9d594d 100644 --- a/engines/cine/various.cpp +++ b/engines/cine/various.cpp @@ -36,6 +36,7 @@ namespace Cine { int16 allowSystemMenu = 0; +bool inMenu; int16 commandVar3[4]; int16 commandVar1; @@ -911,6 +912,8 @@ void CineEngine::makeSystemMenu(void) { int16 systemCommand; if (!allowSystemMenu) { + inMenu = true; + manageEvents(); getMouseData(mouseUpdateStatus, (uint16 *)&mouseButton,(uint16 *)&mouseX, (uint16 *)&mouseY); @@ -1038,6 +1041,8 @@ void CineEngine::makeSystemMenu(void) { break; } } + + inMenu = false; } } @@ -1841,6 +1846,8 @@ void makeActionMenu(void) { uint16 mouseX; uint16 mouseY; + inMenu = true; + getMouseData(mouseUpdateStatus, &mouseButton, &mouseX, &mouseY); if (g_cine->getGameType() == Cine::GType_OS) { @@ -1851,8 +1858,10 @@ void makeActionMenu(void) { canUseOnObject = 1; } } else { - playerCommand = makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70); + playerCommand = makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70); } + + inMenu = false; } uint16 executePlayerInput(void) { diff --git a/engines/cine/various.h b/engines/cine/various.h index 5a6565fde6..d32040c8f5 100644 --- a/engines/cine/various.h +++ b/engines/cine/various.h @@ -40,6 +40,7 @@ void makeCommandLine(void); void makeActionMenu(void); extern int16 allowSystemMenu; +extern bool inMenu; struct unk1Struct { byte *ptr; |