mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Undo IsHovered > IsItemHovered, shorter name wins
This commit is contained in:
parent
f30d23a502
commit
309ff44579
@ -1671,7 +1671,7 @@ ImVec2 GetMousePos()
|
||||
return GImGui.IO.MousePos;
|
||||
}
|
||||
|
||||
bool IsItemHovered()
|
||||
bool IsHovered()
|
||||
{
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
return window->DC.LastItemHovered;
|
||||
@ -5427,7 +5427,7 @@ void ShowTestWindow(bool* open)
|
||||
ImGui::RadioButton("radio c", &e, 2);
|
||||
|
||||
ImGui::Text("Hover me");
|
||||
if (ImGui::IsItemHovered())
|
||||
if (ImGui::IsHovered())
|
||||
ImGui::SetTooltip("I am a tooltip");
|
||||
|
||||
static int item = 1;
|
||||
|
2
imgui.h
2
imgui.h
@ -231,7 +231,7 @@ namespace ImGui
|
||||
// Utilities
|
||||
void SetTooltip(const char* fmt, ...); // set tooltip under mouse-cursor, typically use with ImGui::IsHovered(). (currently no contention handling, last call win)
|
||||
void SetNewWindowDefaultPos(ImVec2 pos); // set position of window that do
|
||||
bool IsItemHovered(); // was the last item active area hovered by mouse?
|
||||
bool IsHovered(); // was the last item active area hovered by mouse?
|
||||
ImVec2 GetItemBoxMin(); // get bounding box of last item
|
||||
ImVec2 GetItemBoxMax(); // get bounding box of last item
|
||||
bool IsClipped(ImVec2 item_size); // to perform coarse clipping on user's side (as an optimisation)
|
||||
|
Loading…
Reference in New Issue
Block a user