mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Merge branch 'master' into viewport
# Conflicts: # examples/imgui_impl_dx10.cpp # examples/imgui_impl_dx11.cpp # examples/imgui_impl_glfw.cpp # examples/imgui_impl_opengl2.cpp # examples/imgui_impl_opengl3.cpp # examples/imgui_impl_sdl.cpp # examples/imgui_impl_win32.cpp # imgui.h
This commit is contained in:
19
imgui.cpp
19
imgui.cpp
@ -1115,7 +1115,8 @@ ImGuiIO::ImGuiIO()
|
||||
ConfigInputTextCursorBlink = true;
|
||||
ConfigResizeWindowsFromEdges = false;
|
||||
|
||||
// Settings (User Functions)
|
||||
// Platform Functions
|
||||
BackendPlatformName = BackendRendererName = NULL;
|
||||
GetClipboardTextFn = GetClipboardTextFn_DefaultImpl; // Platform dependent default implementations
|
||||
SetClipboardTextFn = SetClipboardTextFn_DefaultImpl;
|
||||
ClipboardUserData = NULL;
|
||||
@ -1124,7 +1125,7 @@ ImGuiIO::ImGuiIO()
|
||||
RenderDrawListsFn = NULL;
|
||||
#endif
|
||||
|
||||
// Input (NB: we already have memset zero the entire structure)
|
||||
// Input (NB: we already have memset zero the entire structure!)
|
||||
MousePos = ImVec2(-FLT_MAX, -FLT_MAX);
|
||||
MousePosPrev = ImVec2(-FLT_MAX, -FLT_MAX);
|
||||
MouseDragThreshold = 6.0f;
|
||||
@ -5616,13 +5617,15 @@ void ImGui::FocusPreviousWindowIgnoringOne(ImGuiWindow* ignore_window)
|
||||
ImGuiContext& g = *GImGui;
|
||||
for (int i = g.WindowsFocusOrder.Size - 1; i >= 0; i--)
|
||||
{
|
||||
// We may later decide to test for different NoXXXInputs based on the active navigation input (mouse vs nav) but that may feel more confusing to the user.
|
||||
ImGuiWindow* window = g.WindowsFocusOrder[i];
|
||||
if (window != ignore_window && window->WasActive && !(window->Flags & ImGuiWindowFlags_ChildWindow))
|
||||
{
|
||||
ImGuiWindow* focus_window = NavRestoreLastChildNavWindow(window);
|
||||
FocusWindow(focus_window);
|
||||
return;
|
||||
}
|
||||
if ((window->Flags & (ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs)) != (ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs))
|
||||
{
|
||||
ImGuiWindow* focus_window = NavRestoreLastChildNavWindow(window);
|
||||
FocusWindow(focus_window);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5999,6 +6002,8 @@ bool ImGui::IsWindowFocused(ImGuiFocusedFlags flags)
|
||||
}
|
||||
|
||||
// Can we focus this window with CTRL+TAB (or PadMenu + PadFocusPrev/PadFocusNext)
|
||||
// Note that NoNavFocus makes the window not reachable with CTRL+TAB but it can still be focused with mouse or programmaticaly.
|
||||
// If you want a window to never be focused, you may use the e.g. NoInputs flag.
|
||||
bool ImGui::IsWindowNavFocusable(ImGuiWindow* window)
|
||||
{
|
||||
return window->Active && window == window->RootWindow && !(window->Flags & ImGuiWindowFlags_NoNavFocus);
|
||||
|
Reference in New Issue
Block a user