Browse Source
Merge pull request #1564 from PanosK92/master
Simplified return of ImGui::IsKeyReleased().
pull/1572/head
omar
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
3 deletions
-
imgui.cpp
|
@ -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) |
|
|