diff options
author | Christopher Page | 2008-06-24 21:15:30 +0000 |
---|---|---|
committer | Christopher Page | 2008-06-24 21:15:30 +0000 |
commit | f878820bbee1e7e4659ca601872674082334fa63 (patch) | |
tree | d1b05985a2b1758e8648fe86a64a5ef2562f1765 /backends | |
parent | 65abece4c67c4fb574caac717fff24bfb5f31d69 (diff) | |
download | scummvm-rg350-f878820bbee1e7e4659ca601872674082334fa63.tar.gz scummvm-rg350-f878820bbee1e7e4659ca601872674082334fa63.tar.bz2 scummvm-rg350-f878820bbee1e7e4659ca601872674082334fa63.zip |
Created Global Main Menu Dialog. Made a uniform _quit flag for engines. So far agi, agos, and cine are now using the new _quit flag.
svn-id: r32770
Diffstat (limited to 'backends')
-rw-r--r-- | backends/events/default/default-events.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp index 0caba25792..6343f1f9c5 100644 --- a/backends/events/default/default-events.cpp +++ b/backends/events/default/default-events.cpp @@ -375,7 +375,6 @@ bool DefaultEventManager::pollEvent(Common::Event &event) { switch (event.type) { case Common::EVENT_KEYDOWN: _modifierState = event.kbd.flags; - // init continuous event stream // not done on PalmOS because keyboard is emulated and keyup is not generated #if !defined(PALMOS_MODE) @@ -384,7 +383,14 @@ bool DefaultEventManager::pollEvent(Common::Event &event) { _currentKeyDown.flags = event.kbd.flags; _keyRepeatTime = time + kKeyRepeatInitialDelay; #endif + + // Global Main Menu + if (event.kbd.keycode == Common::KEYCODE_F11) + if (g_engine && !g_engine->isPaused()) + g_engine->mainMenuDialog(); + break; + case Common::EVENT_KEYUP: _modifierState = event.kbd.flags; if (event.kbd.keycode == _currentKeyDown.keycode) { @@ -401,6 +407,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) { _mousePos = event.mouse; _buttonState |= LBUTTON; break; + case Common::EVENT_LBUTTONUP: _mousePos = event.mouse; _buttonState &= ~LBUTTON; @@ -410,11 +417,17 @@ bool DefaultEventManager::pollEvent(Common::Event &event) { _mousePos = event.mouse; _buttonState |= RBUTTON; break; + case Common::EVENT_RBUTTONUP: _mousePos = event.mouse; _buttonState &= ~RBUTTON; break; + case Common::EVENT_MAINMENU: + if (g_engine && !g_engine->isPaused()) + g_engine->mainMenuDialog(); + break; + case Common::EVENT_QUIT: if (ConfMan.getBool("confirm_exit")) { if (g_engine) |