Fix 'K' key to display "K" instead of "L". Fix keys being improperly deleted/added to new keybinds list. Allow keybinds to now be changed. Fix keybind update request message not updating properly for menu keys.

This commit is contained in:
2024-02-06 22:38:40 -06:00
parent 1f244777c9
commit 0ca94369ac
12 changed files with 35 additions and 17 deletions
+9 -2
View File
@@ -327,7 +327,7 @@ std::map<std::pair<InputType,int>,GenericKey::KeyInfo> GenericKey::keyLiteral={
{{KEY, H},{"H"}},
{{KEY, I},{"I"}},
{{KEY, J},{"J"}},
{{KEY, K},{"L"}},
{{KEY, K},{"K"}},
{{KEY, L},{"L"}},
{{KEY, M},{"M"}},
{{KEY, N},{"N"}},
@@ -539,9 +539,16 @@ const InputEngageGroup InputEngageGroup::operator=(const InputEngageGroup&rhs){
void InputGroup::RemovePrimaryKeybind(InputType type){
keyOrder.erase(keyOrder.begin());
auto primaryInputIt=std::find_if(keyOrder.begin(),keyOrder.end(),[&](Input&input){return input.GetType()==type;});
if(primaryInputIt!=keyOrder.end()){
Input&primaryInput=*primaryInputIt;
keys.erase(primaryInput);
keyOrder.erase(primaryInputIt);
}else ERR(std::format("WARNING! Could not find a valid primary input of type {}! THIS SHOULD NOT BE HAPPENING!",int(type)));
}
void InputGroup::AddPrimaryKeybind(Input key){
keys.insert(key);
keyOrder.insert(keyOrder.begin(),{key.GetType(),key.key});
}
void InputGroup::SetNewPrimaryKeybind(Input key){