mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-24 07:40:22 +01:00
Disabled: fixed IsItemHovered() returning true on disabled item when navigated to. (#211)
This commit is contained in:
parent
5dd1e38b7a
commit
638e1a721b
@ -63,6 +63,7 @@ Other Changes:
|
||||
- Disabled: disabled items set HoveredId, allowing e.g. HoveredIdTimer to function. (#211, #3419) [@rokups]
|
||||
- Disabled: disabled mode more consistently release active id if the active item got disabled. (#211)
|
||||
- Disabled: disabled mode doesn't prevent Selectable() from looking selected. (#211)
|
||||
- Disabled: fixed IsItemHovered() returning true on disabled item when navigated to. (#211)
|
||||
- Fixed printf-style format checks on non-MinGW flavors. (#4183, #3592)
|
||||
- Fonts: Functions with a 'float size_pixels' parameter can accept zero if it is set in ImFontSize::SizePixels.
|
||||
- Fonts: Prefer using U+FFFD character for fallback instead of '?', if available. (#4269)
|
||||
|
@ -3162,7 +3162,11 @@ bool ImGui::IsItemHovered(ImGuiHoveredFlags flags)
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = g.CurrentWindow;
|
||||
if (g.NavDisableMouseHover && !g.NavDisableHighlight)
|
||||
{
|
||||
if ((g.CurrentItemFlags & ImGuiItemFlags_Disabled) && !(flags & ImGuiHoveredFlags_AllowWhenDisabled))
|
||||
return false;
|
||||
return IsItemFocused();
|
||||
}
|
||||
|
||||
// Test for bounding box overlap, as updated as ItemAdd()
|
||||
ImGuiItemStatusFlags status_flags = window->DC.LastItemStatusFlags;
|
||||
|
Loading…
Reference in New Issue
Block a user