|
@@ -2051,6 +2051,8 @@ bool ImGui::IsItemHovered(ImGuiHoveredFlags flags)
|
|
return false;
|
|
return false;
|
|
if (!IsWindowContentHoverable(window, flags))
|
|
if (!IsWindowContentHoverable(window, flags))
|
|
return false;
|
|
return false;
|
|
|
|
+ if (window->DC.ItemFlags & ImGuiItemFlags_Disabled)
|
|
|
|
+ return false;
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2070,6 +2072,8 @@ bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id)
|
|
return false;
|
|
return false;
|
|
if (!IsWindowContentHoverable(window, ImGuiHoveredFlags_Default))
|
|
if (!IsWindowContentHoverable(window, ImGuiHoveredFlags_Default))
|
|
return false;
|
|
return false;
|
|
|
|
+ if (window->DC.ItemFlags & ImGuiItemFlags_Disabled)
|
|
|
|
+ return false;
|
|
|
|
|
|
SetHoveredID(id);
|
|
SetHoveredID(id);
|
|
return true;
|
|
return true;
|
|
@@ -2090,7 +2094,7 @@ bool ImGui::FocusableItemRegister(ImGuiWindow* window, ImGuiID id, bool tab_stop
|
|
{
|
|
{
|
|
ImGuiContext& g = *GImGui;
|
|
ImGuiContext& g = *GImGui;
|
|
|
|
|
|
- const bool allow_keyboard_focus = (window->DC.ItemFlags & ImGuiItemFlags_AllowKeyboardFocus) != 0;
|
|
|
|
|
|
+ const bool allow_keyboard_focus = (window->DC.ItemFlags & (ImGuiItemFlags_AllowKeyboardFocus | ImGuiItemFlags_Disabled)) == ImGuiItemFlags_AllowKeyboardFocus;
|
|
window->FocusIdxAllCounter++;
|
|
window->FocusIdxAllCounter++;
|
|
if (allow_keyboard_focus)
|
|
if (allow_keyboard_focus)
|
|
window->FocusIdxTabCounter++;
|
|
window->FocusIdxTabCounter++;
|