1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-12-01 10:47:24 +01:00

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?)

This commit is contained in:
omar 2017-10-27 20:54:48 +02:00
parent d55b69ad6e
commit b9ebb34a04

View File

@ -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;