Skip to content

Commit

Permalink
Internals: renamed HoveredIdDisabled to HoveredIdIsDisabled for consi…
Browse files Browse the repository at this point in the history
…stency.
  • Loading branch information
ocornut committed Jun 10, 2024
1 parent 7260bb5 commit d46a0aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4172,7 +4172,7 @@ bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flag
// Done with rectangle culling so we can perform heavier checks now.
if (!(item_flags & ImGuiItemFlags_NoWindowHoverableCheck) && !IsWindowContentHoverable(window, ImGuiHoveredFlags_None))
{
g.HoveredIdDisabled = true;
g.HoveredIdIsDisabled = true;
return false;
}

Expand Down Expand Up @@ -4207,7 +4207,7 @@ bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flag
// Release active id if turning disabled
if (g.ActiveId == id && id != 0)
ClearActiveID();
g.HoveredIdDisabled = true;
g.HoveredIdIsDisabled = true;
return false;
}

Expand Down Expand Up @@ -4510,7 +4510,7 @@ void ImGui::UpdateMouseMovingWindowEndFrame()
g.MovingWindow = NULL;

// Cancel moving if clicked over an item which was disabled or inhibited by popups (note that we know HoveredId == 0 already)
if (g.HoveredIdDisabled)
if (g.HoveredIdIsDisabled)
g.MovingWindow = NULL;
}
else if (root_window == NULL && g.NavWindow != NULL)
Expand Down Expand Up @@ -4704,7 +4704,7 @@ void ImGui::NewFrame()
g.HoveredIdPreviousFrame = g.HoveredId;
g.HoveredId = 0;
g.HoveredIdAllowOverlap = false;
g.HoveredIdDisabled = false;
g.HoveredIdIsDisabled = false;

// Clear ActiveID if the item is not alive anymore.
// In 1.87, the common most call to KeepAliveID() was moved from GetID() to ItemAdd().
Expand Down
4 changes: 2 additions & 2 deletions imgui_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -1971,7 +1971,7 @@ struct ImGuiContext
float HoveredIdTimer; // Measure contiguous hovering time
float HoveredIdNotActiveTimer; // Measure contiguous hovering time where the item has not been active
bool HoveredIdAllowOverlap;
bool HoveredIdDisabled; // At least one widget passed the rect test, but has been discarded by disabled flag or popup inhibit. May be true even if HoveredId == 0.
bool HoveredIdIsDisabled; // At least one widget passed the rect test, but has been discarded by disabled flag or popup inhibit. May be true even if HoveredId == 0.
bool ItemUnclipByLog; // Disable ItemAdd() clipping, essentially a memory-locality friendly copy of LogEnabled
ImGuiID ActiveId; // Active widget
ImGuiID ActiveIdIsAlive; // Active widget has been seen this frame (we can't use a bool as the ActiveId may change within the frame)
Expand Down Expand Up @@ -2279,7 +2279,7 @@ struct ImGuiContext
DebugHookIdInfo = 0;
HoveredId = HoveredIdPreviousFrame = 0;
HoveredIdAllowOverlap = false;
HoveredIdDisabled = false;
HoveredIdIsDisabled = false;
HoveredIdTimer = HoveredIdNotActiveTimer = 0.0f;
ItemUnclipByLog = false;
ActiveId = 0;
Expand Down

0 comments on commit d46a0aa

Please sign in to comment.