|
|
|
@ -5488,6 +5488,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
|
|
UpdateWindowParentAndRootLinks(window, flags, parent_window);
|
|
|
|
|
|
|
|
|
|
// Process SetNextWindow***() calls
|
|
|
|
|
// (FIXME: Consider splitting the HasXXX flags into X/Y components
|
|
|
|
|
bool window_pos_set_by_api = false;
|
|
|
|
|
bool window_size_x_set_by_api = false, window_size_y_set_by_api = false;
|
|
|
|
|
if (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasPos)
|
|
|
|
@ -5512,6 +5513,19 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
|
|
window_size_y_set_by_api = (window->SetWindowSizeAllowFlags & g.NextWindowData.SizeCond) != 0 && (g.NextWindowData.SizeVal.y > 0.0f);
|
|
|
|
|
SetWindowSize(window, g.NextWindowData.SizeVal, g.NextWindowData.SizeCond);
|
|
|
|
|
}
|
|
|
|
|
if (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasScroll)
|
|
|
|
|
{
|
|
|
|
|
if (g.NextWindowData.ScrollVal.x >= 0.0f)
|
|
|
|
|
{
|
|
|
|
|
window->ScrollTarget.x = g.NextWindowData.ScrollVal.x;
|
|
|
|
|
window->ScrollTargetCenterRatio.x = 0.0f;
|
|
|
|
|
}
|
|
|
|
|
if (g.NextWindowData.ScrollVal.y >= 0.0f)
|
|
|
|
|
{
|
|
|
|
|
window->ScrollTarget.y = g.NextWindowData.ScrollVal.y;
|
|
|
|
|
window->ScrollTargetCenterRatio.y = 0.0f;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasContentSize)
|
|
|
|
|
window->ContentSizeExplicit = g.NextWindowData.ContentSizeVal;
|
|
|
|
|
else if (first_begin_of_the_frame)
|
|
|
|
@ -6513,6 +6527,13 @@ void ImGui::SetNextWindowContentSize(const ImVec2& size)
|
|
|
|
|
g.NextWindowData.ContentSizeVal = size;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ImGui::SetNextWindowScroll(const ImVec2& scroll)
|
|
|
|
|
{
|
|
|
|
|
ImGuiContext& g = *GImGui;
|
|
|
|
|
g.NextWindowData.Flags |= ImGuiNextWindowDataFlags_HasScroll;
|
|
|
|
|
g.NextWindowData.ScrollVal = scroll;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ImGui::SetNextWindowCollapsed(bool collapsed, ImGuiCond cond)
|
|
|
|
|
{
|
|
|
|
|
ImGuiContext& g = *GImGui;
|
|
|
|
|