mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-12 00:14:20 +00:00
IsWindowFocused(): oops, that was bound to happen with loosely typed enums (this is sort of why I made both values identical - no direct side effects).
This commit is contained in:
parent
8b59ed0708
commit
027ffd91ea
1 changed files with 3 additions and 3 deletions
|
|
@ -5521,13 +5521,13 @@ bool ImGui::IsWindowFocused(ImGuiFocusedFlags flags)
|
|||
ImGuiContext& g = *GImGui;
|
||||
IM_ASSERT(g.CurrentWindow); // Not inside a Begin()/End()
|
||||
|
||||
switch (flags & (ImGuiFocusedFlags_RootWindow | ImGuiHoveredFlags_ChildWindows))
|
||||
switch (flags & (ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows))
|
||||
{
|
||||
case ImGuiFocusedFlags_RootWindow | ImGuiHoveredFlags_ChildWindows:
|
||||
case ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows:
|
||||
return g.NavWindow && g.CurrentWindow->RootWindow == g.NavWindow->RootWindow;
|
||||
case ImGuiFocusedFlags_RootWindow:
|
||||
return g.CurrentWindow->RootWindow == g.NavWindow;
|
||||
case ImGuiHoveredFlags_ChildWindows:
|
||||
case ImGuiFocusedFlags_ChildWindows:
|
||||
return g.NavWindow && IsWindowChildOf(g.NavWindow, g.CurrentWindow);
|
||||
default:
|
||||
return g.CurrentWindow == g.NavWindow;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue