mirror of
https://github.com/ocornut/imgui.git
synced 2025-02-06 14:24:29 +01:00
Simplified return of ImGui::IsKeyReleased()
This commit is contained in:
parent
5eb293c879
commit
7c8a19978d
@ -3507,9 +3507,7 @@ bool ImGui::IsKeyReleased(int user_key_index)
|
|||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
if (user_key_index < 0) return false;
|
if (user_key_index < 0) return false;
|
||||||
IM_ASSERT(user_key_index >= 0 && user_key_index < IM_ARRAYSIZE(g.IO.KeysDown));
|
IM_ASSERT(user_key_index >= 0 && user_key_index < IM_ARRAYSIZE(g.IO.KeysDown));
|
||||||
if (g.IO.KeysDownDurationPrev[user_key_index] >= 0.0f && !g.IO.KeysDown[user_key_index])
|
return g.IO.KeysDownDurationPrev[user_key_index] >= 0.0f && !g.IO.KeysDown[user_key_index];
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ImGui::IsMouseDown(int button)
|
bool ImGui::IsMouseDown(int button)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user