ZVISION: Bool results for keyUp and keyDown events for controls.

This commit is contained in:
Marisa-Chan 2014-07-12 21:52:56 +00:00
parent 7f2d4d9a6c
commit 5a870100bd
4 changed files with 10 additions and 7 deletions

View file

@ -471,7 +471,8 @@ void ScriptManager::onKeyDown(Common::KeyState keyState) {
if (!_activeControls)
return;
for (ControlList::iterator iter = _activeControls->begin(); iter != _activeControls->end(); ++iter) {
(*iter)->onKeyDown(keyState);
if ((*iter)->onKeyDown(keyState))
return;
}
}
@ -479,7 +480,8 @@ void ScriptManager::onKeyUp(Common::KeyState keyState) {
if (!_activeControls)
return;
for (ControlList::iterator iter = _activeControls->begin(); iter != _activeControls->end(); ++iter) {
(*iter)->onKeyUp(keyState);
if ((*iter)->onKeyUp(keyState))
return;
}
}