ANDROID: show ingame menu if menu-button pressed

in scummvm the menu-button triggers the global menu. In residualvm this is rather useless. Hence for GrimEngine openMainMenuDialog() is overridden to open the ingame menu instead.
This commit is contained in:
Tobias Gunkel 2012-04-30 15:14:14 +02:00
parent c501fa8c58
commit 620572e086
3 changed files with 9 additions and 1 deletions

View File

@ -277,7 +277,7 @@ public:
/**
* Run the Global Main Menu Dialog
*/
void openMainMenuDialog();
virtual void openMainMenuDialog();
/**
* Display a warning to the user that the game is not fully supported.

View File

@ -1134,4 +1134,10 @@ bool GrimEngine::hasFeature(EngineFeature f) const {
(f == kSupportsLoadingDuringRuntime);
}
void GrimEngine::openMainMenuDialog() {
Common::KeyState key(Common::KEYCODE_F1, Common::ASCII_F1);
handleControls(Common::EVENT_KEYDOWN, key);
handleControls(Common::EVENT_KEYUP, key);
}
} // end of namespace Grim

View File

@ -179,6 +179,8 @@ public:
TextObjectDefaults _sayLineDefaults, _printLineDefaults, _blastTextDefaults;
virtual void openMainMenuDialog();
private:
void handleControls(Common::EventType type, const Common::KeyState &key);
void handleChars(Common::EventType type, const Common::KeyState &key);