mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Tweaks (calling inner SetNext* functions directly from Begin)
This commit is contained in:
parent
7a61b7dd57
commit
8b9c0b2545
@ -3536,7 +3536,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ImGui::SetWindowPos(g.SetNextWindowPosVal, g.SetNextWindowPosCond);
|
SetWindowPos(window, g.SetNextWindowPosVal, g.SetNextWindowPosCond);
|
||||||
}
|
}
|
||||||
window->DC.CursorPos = backup_cursor_pos;
|
window->DC.CursorPos = backup_cursor_pos;
|
||||||
g.SetNextWindowPosCond = 0;
|
g.SetNextWindowPosCond = 0;
|
||||||
@ -3545,7 +3545,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
|
|||||||
{
|
{
|
||||||
if (!window_was_active) window->SetWindowSizeAllowFlags |= ImGuiSetCond_Appearing;
|
if (!window_was_active) window->SetWindowSizeAllowFlags |= ImGuiSetCond_Appearing;
|
||||||
window_size_set_by_api = (window->SetWindowSizeAllowFlags & g.SetNextWindowSizeCond) != 0;
|
window_size_set_by_api = (window->SetWindowSizeAllowFlags & g.SetNextWindowSizeCond) != 0;
|
||||||
ImGui::SetWindowSize(g.SetNextWindowSizeVal, g.SetNextWindowSizeCond);
|
SetWindowSize(window, g.SetNextWindowSizeVal, g.SetNextWindowSizeCond);
|
||||||
g.SetNextWindowSizeCond = 0;
|
g.SetNextWindowSizeCond = 0;
|
||||||
}
|
}
|
||||||
if (g.SetNextWindowContentSizeCond)
|
if (g.SetNextWindowContentSizeCond)
|
||||||
@ -3560,7 +3560,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
|
|||||||
if (g.SetNextWindowCollapsedCond)
|
if (g.SetNextWindowCollapsedCond)
|
||||||
{
|
{
|
||||||
if (!window_was_active) window->SetWindowCollapsedAllowFlags |= ImGuiSetCond_Appearing;
|
if (!window_was_active) window->SetWindowCollapsedAllowFlags |= ImGuiSetCond_Appearing;
|
||||||
ImGui::SetWindowCollapsed(g.SetNextWindowCollapsedVal, g.SetNextWindowCollapsedCond);
|
SetWindowCollapsed(window, g.SetNextWindowCollapsedVal, g.SetNextWindowCollapsedCond);
|
||||||
g.SetNextWindowCollapsedCond = 0;
|
g.SetNextWindowCollapsedCond = 0;
|
||||||
}
|
}
|
||||||
if (g.SetNextWindowFocus)
|
if (g.SetNextWindowFocus)
|
||||||
|
Loading…
Reference in New Issue
Block a user