mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-13 16:13:51 +00:00
fix(input): reserve Q for strafe-left
This commit is contained in:
parent
6cfb439fd6
commit
565c78d141
2 changed files with 12 additions and 3 deletions
|
|
@ -47,6 +47,10 @@ ImGuiKey KeybindingManager::getKeyForAction(Action action) const {
|
|||
}
|
||||
|
||||
void KeybindingManager::setKeyForAction(Action action, ImGuiKey key) {
|
||||
// Q is reserved for movement (strafe-left) and must never open quest log.
|
||||
if (action == Action::TOGGLE_QUEST_LOG && key == ImGuiKey_Q) {
|
||||
key = ImGuiKey_None;
|
||||
}
|
||||
bindings_[static_cast<int>(action)] = key;
|
||||
}
|
||||
|
||||
|
|
@ -175,9 +179,14 @@ void KeybindingManager::loadFromConfigFile(const std::string& filePath) {
|
|||
}
|
||||
}
|
||||
|
||||
if (key != ImGuiKey_None) {
|
||||
bindings_[actionIdx] = key;
|
||||
if (key == ImGuiKey_None) continue;
|
||||
|
||||
// Q is reserved for movement (strafe-left) and must never open quest log.
|
||||
if (actionIdx == static_cast<int>(Action::TOGGLE_QUEST_LOG) && key == ImGuiKey_Q) {
|
||||
continue;
|
||||
}
|
||||
|
||||
bindings_[actionIdx] = key;
|
||||
}
|
||||
|
||||
file.close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue