diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui.cpp | 14 | ||||
-rw-r--r-- | src/gui/sdlinput.cpp | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 1fb4cb79f..17ad60ac0 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -439,7 +439,7 @@ bool Gui::handleKeyInput() // change focus. if (!eventConsumed && keyInput.getActionId() == static_cast<int>(InputAction::GUI_TAB) - && keyInput.getType() == KeyInput::PRESSED) + && keyInput.getType() == KeyEventType::PRESSED) { if (inputManager.isActionActive(InputAction::GUI_MOD)) mFocusHandler->tabPrevious(); @@ -1252,17 +1252,17 @@ void Gui::distributeKeyEvent(KeyEvent &event) const std::list<KeyListener*> keyListeners = widget->getKeyListeners(); - const unsigned int eventType = event.getType(); + const KeyEventType::Type eventType = event.getType(); // Send the event to all key listeners of the source widget. FOR_EACH (std::list<KeyListener*>::const_iterator, it, keyListeners) { switch (eventType) { - case KeyEvent::PRESSED: + case KeyEventType::PRESSED: (*it)->keyPressed(event); break; - case KeyEvent::RELEASED: + case KeyEventType::RELEASED: (*it)->keyReleased(event); break; default: @@ -1285,15 +1285,15 @@ void Gui::distributeKeyEvent(KeyEvent &event) const void Gui::distributeKeyEventToGlobalKeyListeners(KeyEvent& event) { BLOCK_START("Gui::distributeKeyEventToGlobalKeyListeners") - const unsigned int eventType = event.getType(); + const KeyEventType::Type eventType = event.getType(); FOR_EACH (KeyListenerListIterator, it, mKeyListeners) { switch (eventType) { - case KeyEvent::PRESSED: + case KeyEventType::PRESSED: (*it)->keyPressed(event); break; - case KeyEvent::RELEASED: + case KeyEventType::RELEASED: (*it)->keyReleased(event); break; default: diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp index 6d3121451..665617c8d 100644 --- a/src/gui/sdlinput.cpp +++ b/src/gui/sdlinput.cpp @@ -134,7 +134,7 @@ void SDLInput::pushInput(const SDL_Event &event) { case SDL_KEYDOWN: { - keyInput.setType(KeyInput::PRESSED); + keyInput.setType(KeyEventType::PRESSED); convertKeyEventToKey(event, keyInput); mKeyInputQueue.push(keyInput); break; @@ -142,7 +142,7 @@ void SDLInput::pushInput(const SDL_Event &event) case SDL_KEYUP: { - keyInput.setType(KeyInput::RELEASED); + keyInput.setType(KeyEventType::RELEASED); convertKeyEventToKey(event, keyInput); mKeyInputQueue.push(keyInput); break; @@ -150,7 +150,7 @@ void SDLInput::pushInput(const SDL_Event &event) #ifdef USE_SDL2 case SDL_TEXTINPUT: - keyInput.setType(KeyInput::PRESSED); + keyInput.setType(KeyEventType::PRESSED); keyInput.setKey(Key(Key::TEXTINPUT)); keyInput.setText(event.text.text); mKeyInputQueue.push(keyInput); |