Renamed IsHovered() to IsItemHovered()

This commit is contained in:
omar 2014-11-07 15:49:14 +09:00
parent e19f0d370a
commit 3a64c77826
2 changed files with 5 additions and 4 deletions

View File

@ -138,6 +138,7 @@
API BREAKING CHANGES 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/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/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() - 2014/09/24 (1.12) renamed SetFontScale() to SetWindowFontScale()
@ -1879,7 +1880,7 @@ ImVec2 GetMousePos()
return GImGui.IO.MousePos; return GImGui.IO.MousePos;
} }
bool IsHovered() bool IsItemHovered()
{ {
ImGuiWindow* window = GetCurrentWindow(); ImGuiWindow* window = GetCurrentWindow();
return window->DC.LastItemHovered; return window->DC.LastItemHovered;
@ -6397,12 +6398,12 @@ void ShowTestWindow(bool* open)
ImGui::RadioButton("radio c", &e, 2); ImGui::RadioButton("radio c", &e, 2);
ImGui::Text("Hover me"); ImGui::Text("Hover me");
if (ImGui::IsHovered()) if (ImGui::IsItemHovered())
ImGui::SetTooltip("I am a tooltip"); ImGui::SetTooltip("I am a tooltip");
ImGui::SameLine(); ImGui::SameLine();
ImGui::Text("- or me"); ImGui::Text("- or me");
if (ImGui::IsHovered()) if (ImGui::IsItemHovered())
{ {
ImGui::BeginTooltip(); ImGui::BeginTooltip();
ImGui::Text("I am a fancy tooltip"); ImGui::Text("I am a fancy tooltip");

View File

@ -274,7 +274,7 @@ namespace ImGui
// Utilities // Utilities
IMGUI_API void SetNewWindowDefaultPos(const ImVec2& pos); // set position of window that do 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 bool IsItemFocused(); // was the last item focused for keyboard input?
IMGUI_API ImVec2 GetItemBoxMin(); // get bounding box of last item IMGUI_API ImVec2 GetItemBoxMin(); // get bounding box of last item
IMGUI_API ImVec2 GetItemBoxMax(); // get bounding box of last item IMGUI_API ImVec2 GetItemBoxMax(); // get bounding box of last item