From 217ef444d4abf15e4548ad0b75e3fe78b6959ce9 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 19 Oct 2015 12:02:52 +0100 Subject: [PATCH] ColorEdit4: Fixed broken tooltip on hovering the color button (actually fixes #373, #380) --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 55ec9053..10eeaa5b 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -8481,7 +8481,7 @@ bool ImGui::ColorEdit4(const char* label, float col[4], bool alpha) // Recreate our own tooltip over's ColorButton() one because we want to display correct alpha here if (ImGui::IsItemHovered()) - ImGui::SetTooltip("Color:\n(%.2f,%.2f,%.2f,%.2f)\n#%08X", col[0], col[1], col[2], col[3], IM_F32_TO_INT8(col[0]), IM_F32_TO_INT8(col[1]), IM_F32_TO_INT8(col[2]), IM_F32_TO_INT8(col[3])); + ImGui::SetTooltip("Color:\n(%.2f,%.2f,%.2f,%.2f)\n#%02X%02X%02X%02X", col[0], col[1], col[2], col[3], IM_F32_TO_INT8(col[0]), IM_F32_TO_INT8(col[1]), IM_F32_TO_INT8(col[2]), IM_F32_TO_INT8(col[3])); if (window->DC.ColorEditMode == ImGuiColorEditMode_UserSelectShowButton) {