aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSylvain Dupont2011-01-29 16:19:55 +0000
committerSylvain Dupont2011-01-29 16:19:55 +0000
commit83866978be7c7b3db33c28cdf04a0201f0df1432 (patch)
tree15a94c4eb6c2e61968c85e8c58484688c3666023 /engines
parent896b87c71016b41a2836e4eca792d856b20929ca (diff)
downloadscummvm-rg350-83866978be7c7b3db33c28cdf04a0201f0df1432.tar.gz
scummvm-rg350-83866978be7c7b3db33c28cdf04a0201f0df1432.tar.bz2
scummvm-rg350-83866978be7c7b3db33c28cdf04a0201f0df1432.zip
TOON: Reenable keyboard events
Was disabled when some sticky keyboard flags were activated svn-id: r55617
Diffstat (limited to 'engines')
-rw-r--r--engines/toon/toon.cpp30
1 files changed, 9 insertions, 21 deletions
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 65ca3157a0..65155daac8 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -178,29 +178,31 @@ void ToonEngine::parseInput() {
Common::Event event;
while (_event->pollEvent(event)) {
+
+ bool hasModifier = event.kbd.hasFlags(Common::KBD_ALT|Common::KBD_CTRL|Common::KBD_SHIFT);
switch (event.type) {
case Common::EVENT_KEYUP:
- if ((event.kbd.ascii == 27 || event.kbd.ascii == 32) && !event.kbd.flags) {
+ if ((event.kbd.ascii == 27 || event.kbd.ascii == 32) && !hasModifier) {
_audioManager->stopCurrentVoice();
}
- if (event.kbd.keycode == Common::KEYCODE_F5 && !event.kbd.flags) {
+ if (event.kbd.keycode == Common::KEYCODE_F5 && !hasModifier) {
if(canSaveGameStateCurrently())
saveGame(-1, Common::String());
}
- if (event.kbd.keycode == Common::KEYCODE_F6 && !event.kbd.flags) {
+ if (event.kbd.keycode == Common::KEYCODE_F6 && !hasModifier) {
if(canLoadGameStateCurrently())
loadGame(-1);
}
- if (event.kbd.ascii == 't' && !event.kbd.flags) {
+ if (event.kbd.ascii == 't' && !hasModifier) {
_showConversationText = !_showConversationText;
}
- if (event.kbd.ascii == 'm' && !event.kbd.flags) {
+ if (event.kbd.ascii == 'm' && !hasModifier) {
_audioManager->muteMusic(!_audioManager->isMusicMuted());
}
- if (event.kbd.ascii == 'd' && !event.kbd.flags) {
+ if (event.kbd.ascii == 'd' && !hasModifier) {
_audioManager->muteVoice(!_audioManager->isVoiceMuted());
}
- if (event.kbd.ascii == 's' && !event.kbd.flags) {
+ if (event.kbd.ascii == 's' && !hasModifier) {
_audioManager->muteSfx(!_audioManager->isSfxMuted());
}
@@ -217,7 +219,6 @@ void ToonEngine::parseInput() {
char buf[256];
snprintf(buf, 256, "Could not quick save into slot #%d", slotNum);
GUI::MessageDialog dialog2(buf, "OK", 0);
- //warning("%s", buf);
dialog2.runModal();
}
@@ -248,19 +249,6 @@ void ToonEngine::parseInput() {
}
}
break;
-// Strangerke - Commented (not used)
-// case Common::EVENT_LBUTTONDOWN:
-// break;
-// case Common::EVENT_RBUTTONDOWN:
-// break;
-// case Common::EVENT_LBUTTONUP:
-// break;
-// case Common::EVENT_RBUTTONUP:
-// break;
-// case Common::EVENT_WHEELUP:
-// break;
-// case Common::EVENT_WHEELDOWN:
-// break;
default:
break;
}