From debe6522bb6cc25a31cb7e4a46926d9cc31edb4e Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 7 May 2015 19:00:17 +0100 Subject: [PATCH] Examples: test for tooltip over popup. --- imgui.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 9ffaa6f5..cdab5a64 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -10056,7 +10056,7 @@ void ImGui::ShowTestWindow(bool* opened) if (ImGui::TreeNode("Popup, Menus")) { static int selected_fish = -1; - const char* names[] = { "BreamXYZA", "Haddk", "Mackerel", "Pollock", "Tilefish" }; + const char* names[] = { "Bream", "Haddock", "Mackerel", "Pollock", "Tilefish" }; static bool toggles[] = { true, false, false, false, false }; { @@ -10091,6 +10091,12 @@ void ImGui::ShowTestWindow(bool* opened) for (int i = 0; i < IM_ARRAYSIZE(names); i++) if (ImGui::MenuItem(names[i], "", &toggles[i])) popup_open = false; + + ImGui::Separator(); + ImGui::Text("Tooltip here"); + if (ImGui::IsItemHovered()) + ImGui::SetTooltip("I am a tooltip over a popup"); + ImGui::EndPopup(); } }