Inputs: Added IsKeyChordPressed() public helper function.

Amend 99913b5
This commit is contained in:
ocornut
2023-10-19 14:44:24 +02:00
parent 1b9cb52d7b
commit ade2acfd1d
3 changed files with 9 additions and 0 deletions

View File

@ -9136,6 +9136,12 @@ void ImGui::SetItemKeyOwner(ImGuiKey key, ImGuiInputFlags flags)
}
}
// This is the only public API until we expose owner_id versions of the API as replacements.
bool ImGui::IsKeyChordPressed(ImGuiKeyChord key_chord)
{
return IsKeyChordPressed(key_chord, 0, ImGuiInputFlags_None);
}
// This is equivalent to comparing KeyMods + doing a IsKeyPressed()
bool ImGui::IsKeyChordPressed(ImGuiKeyChord key_chord, ImGuiID owner_id, ImGuiInputFlags flags)
{