diff options
author | Filippos Karapetis | 2007-09-19 08:27:32 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-09-19 08:27:32 +0000 |
commit | a89694c0d61a75a960f5bec6c498659c988401cc (patch) | |
tree | 280a0256ddbbb2980ec931ec6068fea195e4e415 /engines/agi/preagi_common.cpp | |
parent | 85b1bc594d96bbb1fb9aec3f8e085f219bb52a89 (diff) | |
download | scummvm-rg350-a89694c0d61a75a960f5bec6c498659c988401cc.tar.gz scummvm-rg350-a89694c0d61a75a960f5bec6c498659c988401cc.tar.bz2 scummvm-rg350-a89694c0d61a75a960f5bec6c498659c988401cc.zip |
Moved some keyboard code from Winnie together with the other keyboard functions
svn-id: r28965
Diffstat (limited to 'engines/agi/preagi_common.cpp')
-rw-r--r-- | engines/agi/preagi_common.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/engines/agi/preagi_common.cpp b/engines/agi/preagi_common.cpp index a1d6883f58..5e735b896a 100644 --- a/engines/agi/preagi_common.cpp +++ b/engines/agi/preagi_common.cpp @@ -208,4 +208,31 @@ bool PreAgiEngine::waitAnyKeyChoice() { } } +bool PreAgiEngine::getSelOkBack() { + Common::Event event; + + for (;;) { + while (_eventMan->pollEvent(event)) { + switch (event.type) { + case Common::EVENT_QUIT: + _system->quit(); + break; + case Common::EVENT_LBUTTONUP: + return true; + case Common::EVENT_RBUTTONUP: + return false; + case Common::EVENT_KEYDOWN: + switch (event.kbd.keycode) { + case Common::KEYCODE_BACKSPACE: + return false; + default: + return true; + } + default: + break; + } + } + } +} + } |