From 209edcc2477ca6bfa0cb6436b775c7fccbf145c2 Mon Sep 17 00:00:00 2001 From: korenkonder Date: Tue, 4 Jun 2024 17:35:18 +0300 Subject: [PATCH] Fixed incorrect order of arguments in IsMouseClicked(). (#7657, #456) Amend 85513de24 --- docs/CHANGELOG.txt | 4 ++++ imgui.cpp | 2 +- imgui.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 7f3be8b0..9578f87c 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -43,6 +43,10 @@ Breaking changes: Other changes: +- Inputs: Fixed IsMouseClicked(..., repeat=true); broken on 2024/05/22. + (due to an internal api parameter swap, repeat wouldn't be honored and + ownership would be accidently checked even though this api is meant to not + check ownership). (#7657) [@korenkonder] - Windows: fixed altering FramePadding mid-frame not correctly affecting logic responsible for honoring io.ConfigWindowsMoveFromTitleBarOnly. (#7576, #899) - Scrollbar: made scrolling logic more standard: clicking above or below the diff --git a/imgui.cpp b/imgui.cpp index 96a0ca11..cb01836d 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -8900,7 +8900,7 @@ bool ImGui::IsMouseDown(ImGuiMouseButton button, ImGuiID owner_id) bool ImGui::IsMouseClicked(ImGuiMouseButton button, bool repeat) { - return IsMouseClicked(button, ImGuiKeyOwner_Any, repeat ? ImGuiInputFlags_Repeat : ImGuiInputFlags_None); + return IsMouseClicked(button, repeat ? ImGuiInputFlags_Repeat : ImGuiInputFlags_None, ImGuiKeyOwner_Any); } bool ImGui::IsMouseClicked(ImGuiMouseButton button, ImGuiInputFlags flags, ImGuiID owner_id) diff --git a/imgui.h b/imgui.h index 477cf4b5..69a53b01 100644 --- a/imgui.h +++ b/imgui.h @@ -28,7 +28,7 @@ // Library Version // (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345') #define IMGUI_VERSION "1.90.8 WIP" -#define IMGUI_VERSION_NUM 19074 +#define IMGUI_VERSION_NUM 19075 #define IMGUI_HAS_TABLE /*