mirror of
https://github.com/Drezil/imgui.git
synced 2025-09-13 14:43:14 +02:00
Merge branch 'master' into viewport
# Conflicts: # imgui.cpp
This commit is contained in:
27
imgui.cpp
27
imgui.cpp
@ -805,7 +805,9 @@
|
||||
#endif
|
||||
|
||||
#include "imgui.h"
|
||||
#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#endif
|
||||
#include "imgui_internal.h"
|
||||
|
||||
#include <ctype.h> // toupper, isprint
|
||||
@ -3243,11 +3245,7 @@ static const char* GetFallbackWindowNameForWindowingList(ImGuiWindow* window)
|
||||
void ImGui::NavUpdateWindowingList()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
if (!g.NavWindowingTarget)
|
||||
{
|
||||
g.NavWindowingList = NULL;
|
||||
return;
|
||||
}
|
||||
IM_ASSERT(g.NavWindowingTarget != NULL);
|
||||
|
||||
if (g.NavWindowingList == NULL)
|
||||
g.NavWindowingList = FindWindowByName("###NavWindowingList");
|
||||
@ -4919,6 +4917,12 @@ void ImGui::EndFrame()
|
||||
g.PlatformImePosViewport = NULL;
|
||||
}
|
||||
|
||||
// Hide implicit "Debug" window if it hasn't been used
|
||||
IM_ASSERT(g.CurrentWindowStack.Size == 1); // Mismatched Begin()/End() calls, did you forget to call end on g.CurrentWindow->Name?
|
||||
if (g.CurrentWindow && !g.CurrentWindow->WriteAccessed)
|
||||
g.CurrentWindow->Active = false;
|
||||
End();
|
||||
|
||||
// Draw modal whitening background on _other_ viewports than the one the modal is one
|
||||
ImGuiWindow* modal_window = GetFrontMostPopupModal();
|
||||
const bool dim_bg_for_modal = (modal_window != NULL);
|
||||
@ -4938,16 +4942,13 @@ void ImGui::EndFrame()
|
||||
draw_list->AddRectFilled(viewport->Pos, viewport->Pos + viewport->Size, dim_bg_col);
|
||||
}
|
||||
|
||||
NavUpdateWindowingList();
|
||||
|
||||
// Hide implicit "Debug" window if it hasn't been used
|
||||
IM_ASSERT(g.CurrentWindowStack.Size == 1); // Mismatched Begin()/End() calls, did you forget to call end on g.CurrentWindow->Name?
|
||||
if (g.CurrentWindow && !g.CurrentWindow->WriteAccessed)
|
||||
g.CurrentWindow->Active = false;
|
||||
End();
|
||||
// Show CTRL+TAB list
|
||||
if (g.NavWindowingTarget)
|
||||
NavUpdateWindowingList();
|
||||
|
||||
SetCurrentViewport(NULL, NULL);
|
||||
|
||||
// Initiate moving window
|
||||
if (g.ActiveId == 0 && g.HoveredId == 0)
|
||||
{
|
||||
if (!g.NavWindow || !g.NavWindow->Appearing) // Unless we just made a window/popup appear
|
||||
@ -5037,7 +5038,7 @@ void ImGui::Render()
|
||||
g.Viewports[n]->DrawDataBuilder.Clear();
|
||||
ImGuiWindow* windows_to_render_front_most[2];
|
||||
windows_to_render_front_most[0] = (g.NavWindowingTarget && !(g.NavWindowingTarget->Flags & ImGuiWindowFlags_NoBringToFrontOnFocus)) ? g.NavWindowingTarget->RootWindow : NULL;
|
||||
windows_to_render_front_most[1] = (g.NavWindowingList);
|
||||
windows_to_render_front_most[1] = g.NavWindowingTarget ? g.NavWindowingList : NULL;
|
||||
for (int n = 0; n != g.Windows.Size; n++)
|
||||
{
|
||||
ImGuiWindow* window = g.Windows[n];
|
||||
|
Reference in New Issue
Block a user