mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Internals: extracted a more reusable BeginViewportSideBar() out of BeginMainMenuBar(). (#3966, #3518)
Complement ca34c81c
in docking branch which removed assumption that we can't tell size ahead of Begin().
This commit is contained in:
@ -10566,9 +10566,9 @@ static void ImGui::UpdateViewportsNewFrame()
|
||||
ImGuiViewportP* viewport = g.Viewports[n];
|
||||
|
||||
// Lock down space taken by menu bars and status bars, reset the offset for fucntions like BeginMainMenuBar() to alter them again.
|
||||
viewport->WorkOffsetMin = viewport->CurrWorkOffsetMin;
|
||||
viewport->WorkOffsetMax = viewport->CurrWorkOffsetMax;
|
||||
viewport->CurrWorkOffsetMin = viewport->CurrWorkOffsetMax = ImVec2(0.0f, 0.0f);
|
||||
viewport->WorkOffsetMin = viewport->BuildWorkOffsetMin;
|
||||
viewport->WorkOffsetMax = viewport->BuildWorkOffsetMax;
|
||||
viewport->BuildWorkOffsetMin = viewport->BuildWorkOffsetMax = ImVec2(0.0f, 0.0f);
|
||||
viewport->UpdateWorkRect();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user