LAB: Start to untangle the mess in the event code
This commit is contained in:
parent
60657f9fd2
commit
9c749c7d2e
3 changed files with 25 additions and 61 deletions
|
@ -118,7 +118,7 @@ IntuiMessage *EventManager::getMsg() {
|
|||
|
||||
updateMouse();
|
||||
|
||||
Common::KeyCode curKey;
|
||||
Common::KeyCode curKey = keyPress();
|
||||
|
||||
if (_lastButtonHit) {
|
||||
updateMouse();
|
||||
|
@ -135,7 +135,7 @@ IntuiMessage *EventManager::getMsg() {
|
|||
message._mouse.x /= 2;
|
||||
_leftClick = _rightClick = false;
|
||||
return &message;
|
||||
} else if (keyPress(&curKey)) {
|
||||
} else if (curKey != Common::KEYCODE_INVALID) {
|
||||
message._code = curKey;
|
||||
Button *curButton = checkNumButtonHit(_screenButtonList, message._code);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue