InputText: replaced some uses of SetKeyOwner() + IsKeyPressed() with Shortcut()

Which makes it easier to hook/disable those keys from outside if needed.
This commit is contained in:
ocornut
2022-11-16 15:55:10 +01:00
parent 81160fee56
commit 83cee9e091
4 changed files with 19 additions and 22 deletions

View File

@ -1283,8 +1283,8 @@ typedef ImS16 ImGuiKeyRoutingIndex;
struct ImGuiKeyRoutingData
{
ImGuiKeyRoutingIndex NextEntryIndex;
ImU16 Mods;
ImU8 RoutingNextScore; // Lower is better (0: perfect score)
ImU16 Mods; // Technically we'd only need 4 bits but for simplify we store ImGuiMod_ values which need 16 bits.
ImU8 RoutingNextScore; // Lower is better (0: perfect score)
ImGuiID RoutingCurr;
ImGuiID RoutingNext;