|
|
|
@ -6174,7 +6174,8 @@ void ImGui::Scrollbar(ImGuiLayoutType direction)
|
|
|
|
|
void ImGui::BringWindowToFront(ImGuiWindow* window)
|
|
|
|
|
{
|
|
|
|
|
ImGuiContext& g = *GImGui;
|
|
|
|
|
if (g.Windows.back() == window)
|
|
|
|
|
ImGuiWindow* current_front_window = g.Windows.back();
|
|
|
|
|
if (current_front_window == window || current_front_window->RootWindow == window)
|
|
|
|
|
return;
|
|
|
|
|
for (int i = g.Windows.Size - 2; i >= 0; i--) // We can ignore the front most window
|
|
|
|
|
if (g.Windows[i] == window)
|
|
|
|
@ -7650,8 +7651,9 @@ void ImGui::LogToTTY(int max_depth)
|
|
|
|
|
return;
|
|
|
|
|
ImGuiWindow* window = g.CurrentWindow;
|
|
|
|
|
|
|
|
|
|
g.LogEnabled = true;
|
|
|
|
|
IM_ASSERT(g.LogFile == NULL);
|
|
|
|
|
g.LogFile = stdout;
|
|
|
|
|
g.LogEnabled = true;
|
|
|
|
|
g.LogStartDepth = window->DC.TreeDepth;
|
|
|
|
|
if (max_depth >= 0)
|
|
|
|
|
g.LogAutoExpandMaxDepth = max_depth;
|
|
|
|
@ -7672,6 +7674,7 @@ void ImGui::LogToFile(int max_depth, const char* filename)
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IM_ASSERT(g.LogFile == NULL);
|
|
|
|
|
g.LogFile = ImFileOpen(filename, "ab");
|
|
|
|
|
if (!g.LogFile)
|
|
|
|
|
{
|
|
|
|
@ -7692,8 +7695,9 @@ void ImGui::LogToClipboard(int max_depth)
|
|
|
|
|
return;
|
|
|
|
|
ImGuiWindow* window = g.CurrentWindow;
|
|
|
|
|
|
|
|
|
|
g.LogEnabled = true;
|
|
|
|
|
IM_ASSERT(g.LogFile == NULL);
|
|
|
|
|
g.LogFile = NULL;
|
|
|
|
|
g.LogEnabled = true;
|
|
|
|
|
g.LogStartDepth = window->DC.TreeDepth;
|
|
|
|
|
if (max_depth >= 0)
|
|
|
|
|
g.LogAutoExpandMaxDepth = max_depth;
|
|
|
|
@ -7706,7 +7710,6 @@ void ImGui::LogFinish()
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
LogText(IM_NEWLINE);
|
|
|
|
|
g.LogEnabled = false;
|
|
|
|
|
if (g.LogFile != NULL)
|
|
|
|
|
{
|
|
|
|
|
if (g.LogFile == stdout)
|
|
|
|
@ -7720,6 +7723,7 @@ void ImGui::LogFinish()
|
|
|
|
|
SetClipboardText(g.LogClipboard->begin());
|
|
|
|
|
g.LogClipboard->clear();
|
|
|
|
|
}
|
|
|
|
|
g.LogEnabled = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Helper to display logging buttons
|
|
|
|
|