From 3a64c77826a1d2b2dcdb35e8baa23065f982dc5e Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 7 Nov 2014 15:49:14 +0900 Subject: [PATCH] Renamed IsHovered() to IsItemHovered() --- imgui.cpp | 7 ++++--- imgui.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index a029a292..36551a7e 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -138,6 +138,7 @@ API BREAKING CHANGES ==================== + - 2014/11/07 (1.15) renamed IsHovered() to IsItemHovered() - 2014/10/02 (1.14) renamed IMGUI_INCLUDE_IMGUI_USER_CPP to IMGUI_INCLUDE_IMGUI_USER_INL and imgui_user.cpp to imgui_user.inl (more IDE friendly) - 2014/09/25 (1.13) removed 'text_end' parameter from IO.SetClipboardTextFn (the string is now always zero-terminated for simplicity) - 2014/09/24 (1.12) renamed SetFontScale() to SetWindowFontScale() @@ -1879,7 +1880,7 @@ ImVec2 GetMousePos() return GImGui.IO.MousePos; } -bool IsHovered() +bool IsItemHovered() { ImGuiWindow* window = GetCurrentWindow(); return window->DC.LastItemHovered; @@ -6397,12 +6398,12 @@ void ShowTestWindow(bool* open) ImGui::RadioButton("radio c", &e, 2); ImGui::Text("Hover me"); - if (ImGui::IsHovered()) + if (ImGui::IsItemHovered()) ImGui::SetTooltip("I am a tooltip"); ImGui::SameLine(); ImGui::Text("- or me"); - if (ImGui::IsHovered()) + if (ImGui::IsItemHovered()) { ImGui::BeginTooltip(); ImGui::Text("I am a fancy tooltip"); diff --git a/imgui.h b/imgui.h index 509f26b9..78d74f5b 100644 --- a/imgui.h +++ b/imgui.h @@ -274,7 +274,7 @@ namespace ImGui // Utilities IMGUI_API void SetNewWindowDefaultPos(const ImVec2& pos); // set position of window that do - IMGUI_API bool IsHovered(); // was the last item active area hovered by mouse? + IMGUI_API bool IsItemHovered(); // was the last item active area hovered by mouse? IMGUI_API bool IsItemFocused(); // was the last item focused for keyboard input? IMGUI_API ImVec2 GetItemBoxMin(); // get bounding box of last item IMGUI_API ImVec2 GetItemBoxMax(); // get bounding box of last item