mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-26 13:37:00 +00:00
Comments, tweak
This commit is contained in:
parent
eb311abc92
commit
fb6ef8b1db
@ -3299,8 +3299,9 @@ void ImGui::NewFrame()
|
|||||||
g.CurrentPopupStack.resize(0);
|
g.CurrentPopupStack.resize(0);
|
||||||
ClosePopupsOverWindow(g.NavWindow);
|
ClosePopupsOverWindow(g.NavWindow);
|
||||||
|
|
||||||
// Create implicit window - we will only render it if the user has added something to it.
|
// Create implicit/fallback window - which we will only render it if the user has added something to it.
|
||||||
// We don't use "Debug" to avoid colliding with user trying to create a "Debug" window with custom flags.
|
// We don't use "Debug" to avoid colliding with user trying to create a "Debug" window with custom flags.
|
||||||
|
// This fallback is particularly important as it avoid ImGui:: calls from crashing.
|
||||||
SetNextWindowSize(ImVec2(400,400), ImGuiCond_FirstUseEver);
|
SetNextWindowSize(ImVec2(400,400), ImGuiCond_FirstUseEver);
|
||||||
Begin("Debug##Default");
|
Begin("Debug##Default");
|
||||||
|
|
||||||
@ -4455,7 +4456,7 @@ static void ImGui::UpdateManualResize(ImGuiWindow* window, const ImVec2& size_au
|
|||||||
ImGuiWindowFlags flags = window->Flags;
|
ImGuiWindowFlags flags = window->Flags;
|
||||||
if ((flags & ImGuiWindowFlags_NoResize) || (flags & ImGuiWindowFlags_AlwaysAutoResize) || window->AutoFitFramesX > 0 || window->AutoFitFramesY > 0)
|
if ((flags & ImGuiWindowFlags_NoResize) || (flags & ImGuiWindowFlags_AlwaysAutoResize) || window->AutoFitFramesX > 0 || window->AutoFitFramesY > 0)
|
||||||
return;
|
return;
|
||||||
if (window->WasActive == false) // Early out to avoid running this code for e.g. an hidden implicit Debug window.
|
if (window->WasActive == false) // Early out to avoid running this code for e.g. an hidden implicit/fallback Debug window.
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const int resize_border_count = g.IO.ConfigResizeWindowsFromEdges ? 4 : 0;
|
const int resize_border_count = g.IO.ConfigResizeWindowsFromEdges ? 4 : 0;
|
||||||
|
@ -199,7 +199,7 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
|||||||
|
|
||||||
if (show_app_metrics) { ImGui::ShowMetricsWindow(&show_app_metrics); }
|
if (show_app_metrics) { ImGui::ShowMetricsWindow(&show_app_metrics); }
|
||||||
if (show_app_style_editor) { ImGui::Begin("Style Editor", &show_app_style_editor); ImGui::ShowStyleEditor(); ImGui::End(); }
|
if (show_app_style_editor) { ImGui::Begin("Style Editor", &show_app_style_editor); ImGui::ShowStyleEditor(); ImGui::End(); }
|
||||||
if (show_app_about) { ShowAboutWindow(&show_app_about); }
|
if (show_app_about) { ImGui::ShowAboutWindow(&show_app_about); }
|
||||||
|
|
||||||
// Demonstrate the various window flags. Typically you would just use the default!
|
// Demonstrate the various window flags. Typically you would just use the default!
|
||||||
static bool no_titlebar = false;
|
static bool no_titlebar = false;
|
||||||
@ -2459,7 +2459,7 @@ static void ShowDemoWindowMisc()
|
|||||||
void ImGui::ShowAboutWindow(bool* p_open)
|
void ImGui::ShowAboutWindow(bool* p_open)
|
||||||
{
|
{
|
||||||
ImGui::Begin("About Dear ImGui", p_open, ImGuiWindowFlags_AlwaysAutoResize);
|
ImGui::Begin("About Dear ImGui", p_open, ImGuiWindowFlags_AlwaysAutoResize);
|
||||||
ImGui::Text("Dear ImGui, %s", ImGui::GetVersion());
|
ImGui::Text("Dear ImGui %s", ImGui::GetVersion());
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
ImGui::Text("By Omar Cornut and all dear imgui contributors.");
|
ImGui::Text("By Omar Cornut and all dear imgui contributors.");
|
||||||
ImGui::Text("Dear ImGui is licensed under the MIT License, see LICENSE for more information.");
|
ImGui::Text("Dear ImGui is licensed under the MIT License, see LICENSE for more information.");
|
||||||
|
Loading…
Reference in New Issue
Block a user