Internals: renamed HoveredIdDisabled to HoveredIdIsDisabled for consistency.

master
ocornut ago%!(EXTRA string=11 months)
parent 7260bb51cf
commit d46a0aa069
  1. 8
      imgui.cpp
  2. 4
      imgui_internal.h

@ -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. // Done with rectangle culling so we can perform heavier checks now.
if (!(item_flags & ImGuiItemFlags_NoWindowHoverableCheck) && !IsWindowContentHoverable(window, ImGuiHoveredFlags_None)) if (!(item_flags & ImGuiItemFlags_NoWindowHoverableCheck) && !IsWindowContentHoverable(window, ImGuiHoveredFlags_None))
{ {
g.HoveredIdDisabled = true; g.HoveredIdIsDisabled = true;
return false; return false;
} }
@ -4207,7 +4207,7 @@ bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flag
// Release active id if turning disabled // Release active id if turning disabled
if (g.ActiveId == id && id != 0) if (g.ActiveId == id && id != 0)
ClearActiveID(); ClearActiveID();
g.HoveredIdDisabled = true; g.HoveredIdIsDisabled = true;
return false; return false;
} }
@ -4510,7 +4510,7 @@ void ImGui::UpdateMouseMovingWindowEndFrame()
g.MovingWindow = NULL; g.MovingWindow = NULL;
// Cancel moving if clicked over an item which was disabled or inhibited by popups (note that we know HoveredId == 0 already) // 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; g.MovingWindow = NULL;
} }
else if (root_window == NULL && g.NavWindow != NULL) else if (root_window == NULL && g.NavWindow != NULL)
@ -4704,7 +4704,7 @@ void ImGui::NewFrame()
g.HoveredIdPreviousFrame = g.HoveredId; g.HoveredIdPreviousFrame = g.HoveredId;
g.HoveredId = 0; g.HoveredId = 0;
g.HoveredIdAllowOverlap = false; g.HoveredIdAllowOverlap = false;
g.HoveredIdDisabled = false; g.HoveredIdIsDisabled = false;
// Clear ActiveID if the item is not alive anymore. // Clear ActiveID if the item is not alive anymore.
// In 1.87, the common most call to KeepAliveID() was moved from GetID() to ItemAdd(). // In 1.87, the common most call to KeepAliveID() was moved from GetID() to ItemAdd().

@ -1971,7 +1971,7 @@ struct ImGuiContext
float HoveredIdTimer; // Measure contiguous hovering time float HoveredIdTimer; // Measure contiguous hovering time
float HoveredIdNotActiveTimer; // Measure contiguous hovering time where the item has not been active float HoveredIdNotActiveTimer; // Measure contiguous hovering time where the item has not been active
bool HoveredIdAllowOverlap; 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 bool ItemUnclipByLog; // Disable ItemAdd() clipping, essentially a memory-locality friendly copy of LogEnabled
ImGuiID ActiveId; // Active widget 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) ImGuiID ActiveIdIsAlive; // Active widget has been seen this frame (we can't use a bool as the ActiveId may change within the frame)
@ -2279,7 +2279,7 @@ struct ImGuiContext
DebugHookIdInfo = 0; DebugHookIdInfo = 0;
HoveredId = HoveredIdPreviousFrame = 0; HoveredId = HoveredIdPreviousFrame = 0;
HoveredIdAllowOverlap = false; HoveredIdAllowOverlap = false;
HoveredIdDisabled = false; HoveredIdIsDisabled = false;
HoveredIdTimer = HoveredIdNotActiveTimer = 0.0f; HoveredIdTimer = HoveredIdNotActiveTimer = 0.0f;
ItemUnclipByLog = false; ItemUnclipByLog = false;
ActiveId = 0; ActiveId = 0;

Loading…
Cancel
Save