mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-14 00:39:55 +02:00
Internals: alter ImGuiInputFlags values to leave room + indent.
This commit is contained in:
@ -8427,7 +8427,7 @@ bool ImGui::IsKeyPressed(ImGuiKey key, ImGuiID owner_id, ImGuiInputFlags flags)
|
||||
IM_ASSERT((flags & ~ImGuiInputFlags_SupportedByIsKeyPressed) == 0); // Passing flags not supported by this function!
|
||||
|
||||
bool pressed = (t == 0.0f);
|
||||
if (!pressed && ((flags & ImGuiInputFlags_Repeat) != 0))
|
||||
if (!pressed && (flags & ImGuiInputFlags_Repeat) != 0)
|
||||
{
|
||||
float repeat_delay, repeat_rate;
|
||||
GetTypematicRepeatRate(flags, &repeat_delay, &repeat_rate);
|
||||
@ -9300,7 +9300,7 @@ bool ImGui::IsKeyChordPressed(ImGuiKeyChord key_chord, ImGuiID owner_id, ImGuiIn
|
||||
ImGuiKey key = (ImGuiKey)(key_chord & ~ImGuiMod_Mask_);
|
||||
if (key == ImGuiKey_None)
|
||||
key = ConvertSingleModFlagToKey(&g, mods);
|
||||
if (!IsKeyPressed(key, owner_id, (flags & (ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateMask_))))
|
||||
if (!IsKeyPressed(key, owner_id, (flags & ImGuiInputFlags_RepeatMask_)))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user