ZVISION: Bool results for keyUp and keyDown events for controls.
This commit is contained in:
parent
7f2d4d9a6c
commit
5a870100bd
4 changed files with 10 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue