[KeyboardHandler] Lua-defined keys can now be remapped on first run.
This commit is contained in:
parent
072c3b2942
commit
a0c0491512
@ -117,6 +117,11 @@ void KeyboardHandler::addKey(gk::GameKey id, const std::string &name, SDL_Keycod
|
||||
it.first->second.setKeycode(defaultKey);
|
||||
|
||||
m_keysID.emplace(it.first->second.stringID(), id);
|
||||
|
||||
if (key) {
|
||||
key->setKeycode(it.first->second.keycode());
|
||||
it.first->second.setParent(key);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Key &keyitem = m_keys.at(keyit->second);
|
||||
|
Loading…
x
Reference in New Issue
Block a user