Fixed first button in dialog without attached key being triggered by any unknown key
This commit is contained in:
@@ -1584,6 +1584,7 @@ char keyToChar(sf::Keyboard::Key key, bool isShift) {
|
|||||||
case kb::BackSpace: return '\b';
|
case kb::BackSpace: return '\b';
|
||||||
case kb::Delete: return '\x7f';
|
case kb::Delete: return '\x7f';
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool handle_keystroke(sf::Event& event){
|
bool handle_keystroke(sf::Event& event){
|
||||||
|
@@ -145,7 +145,7 @@ eKeyMod& operator -= (eKeyMod&lhs, eKeyMod rhs){
|
|||||||
bool operator== (cKey a, cKey b){
|
bool operator== (cKey a, cKey b){
|
||||||
if(a.spec != b.spec) return false;
|
if(a.spec != b.spec) return false;
|
||||||
if(a.mod != b.mod) return false;
|
if(a.mod != b.mod) return false;
|
||||||
return a.spec ? a.k == b.k : a.c == b.c;
|
return a.spec ? a.k == b.k : (a.c == 0 ? false : a.c == b.c);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mod_contains(eKeyMod mods, eKeyMod mod) {
|
bool mod_contains(eKeyMod mods, eKeyMod mod) {
|
||||||
|
Reference in New Issue
Block a user