From b9ebb34a047c6bdfe8ccd65f764f25fc874f9cbe Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 27 Oct 2017 20:54:48 +0200 Subject: [PATCH] Nav: ColorButton: Fixed a case of not using local 'hovered' flag directly, messes with some of my drag and drop work, and I can't find/understand the reason why this was left as is (there _was_ a reason at the time but it appears to be obsolete now?) --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 2caee527..15db9ba6 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -10613,7 +10613,7 @@ bool ImGui::ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFl else window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_FrameBg), rounding); // Color button are often in need of some sort of border - if (!(flags & ImGuiColorEditFlags_NoTooltip) && IsItemHovered()) // FIXME-NAVIGATION: 'hovered' ? + if (!(flags & ImGuiColorEditFlags_NoTooltip) && hovered) ColorTooltip(desc_id, &col.x, flags & (ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf)); return pressed;