Ejemplo n.º 1
0
void KeyboardConfig::handleDeActicateKey(const SDL_Event &event)
{
    const int key = getKeyValueFromEvent(event);
    if (key < -1 && key > -500)
        mActiveKeys2[-key] = 0;
    resetRepeat(key);
}
Ejemplo n.º 2
0
KeysVector *KeyboardConfig::getActionVector(const SDL_Event &event)
{
    const int i = getKeyValueFromEvent(event);
//    logger->log("key triggerAction: %d", i);
    if (i != 0 && i < SDLK_LAST && mKeyToAction.find(i) != mKeyToAction.end())
        return &mKeyToAction[i];
    return nullptr;
}
Ejemplo n.º 3
0
int KeyboardConfig::getActionId(const SDL_Event &event)
{
    const int i = getKeyValueFromEvent(event);
//    logger->log("getActionId: %d", i);
    if (i != 0 && i < SDLK_LAST && mKeyToId.find(i) != mKeyToId.end())
        return mKeyToId[i];
    return -1;
}
Ejemplo n.º 4
0
int KeyboardConfig::getKeyIndex(const SDL_Event &event, const int grp) const
{
    const int keyValue = getKeyValueFromEvent(event);
    return inputManager.getKeyIndex(keyValue, grp, INPUT_KEYBOARD);
}
Ejemplo n.º 5
0
InputActionT KeyboardConfig::getKeyIndex(const SDL_Event &event, const int grp)
{
    const int keyValue = getKeyValueFromEvent(event);
    return inputManager.getKeyIndex(keyValue, grp, InputType::KEYBOARD);
}