mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
key name capture
This commit is contained in:
@@ -43,6 +43,7 @@ void EventDispatcher::processLists(ui16 activityFlag, const Functor & cb)
|
||||
processList(AEventsReceiver::TEXTINPUT, textInterested);
|
||||
processList(AEventsReceiver::GESTURE, panningInterested);
|
||||
processList(AEventsReceiver::INPUT_MODE_CHANGE, inputModeChangeInterested);
|
||||
processList(AEventsReceiver::KEY_NAME, keyNameInterested);
|
||||
}
|
||||
|
||||
void EventDispatcher::activateElement(AEventsReceiver * elem, ui16 activityFlag)
|
||||
@@ -133,6 +134,22 @@ void EventDispatcher::dispatchShortcutReleased(const std::vector<EShortcut> & sh
|
||||
}
|
||||
}
|
||||
|
||||
void EventDispatcher::dispatchKeyPressed(const std::string & keyName)
|
||||
{
|
||||
EventReceiversList miCopy = keyNameInterested;
|
||||
|
||||
for(auto & i : miCopy)
|
||||
i->keyPressed(keyName);
|
||||
}
|
||||
|
||||
void EventDispatcher::dispatchKeyReleased(const std::string & keyName)
|
||||
{
|
||||
EventReceiversList miCopy = keyNameInterested;
|
||||
|
||||
for(auto & i : miCopy)
|
||||
i->keyReleased(keyName);
|
||||
}
|
||||
|
||||
void EventDispatcher::dispatchMouseDoubleClick(const Point & position, int tolerance)
|
||||
{
|
||||
handleDoubleButtonClick(position, tolerance);
|
||||
|
||||
Reference in New Issue
Block a user