Moved some keyboard code from Winnie together with the other keyboard functions

svn-id: r28965
This commit is contained in:
Filippos Karapetis 2007-09-19 08:27:32 +00:00
parent 85b1bc594d
commit a89694c0d6
3 changed files with 31 additions and 28 deletions

View file

@ -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;
}
}
}
}
}