mirror of
https://github.com/kevinporetti/UnrealImGui.git
synced 2025-01-18 00:10:32 +00:00
Fixed mapping from FKey to ImGui key index to gracefully handle unsupported keys and work on platforms that does not support all the keys defined in ImGui key map.
Instead of throwing assertion unsupported keys are mapped to 0, what guarantees that ImGui key map is always initialized and unsupported keys mapped to index that cannot be reached from key input events that have non-zero key codes.
This commit is contained in:
parent
6643958586
commit
6c6e766a20
@ -104,9 +104,7 @@ namespace ImGuiInterops
|
||||
return *pCharCode;
|
||||
}
|
||||
|
||||
checkf(false, TEXT("Couldn't find a Key Code for key '%s'. Expecting that all keys should have a Key Code."), *Key.GetDisplayName().ToString());
|
||||
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 GetMouseIndex(const FKey& MouseButton)
|
||||
|
Loading…
Reference in New Issue
Block a user