mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-07 04:30:08 +00:00
Window: Fixed using non-zero pivot in SetNextWindowPos() when the window is collapsed. (#3433)
This commit is contained in:
parent
8c80d533d9
commit
45499b8f2f
2 changed files with 3 additions and 2 deletions
|
|
@ -5721,7 +5721,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||
|
||||
const bool window_pos_with_pivot = (window->SetWindowPosVal.x != FLT_MAX && window->HiddenFramesCannotSkipItems == 0);
|
||||
if (window_pos_with_pivot)
|
||||
SetWindowPos(window, window->SetWindowPosVal - window->SizeFull * window->SetWindowPosPivot, 0); // Position given a pivot (e.g. for centering)
|
||||
SetWindowPos(window, window->SetWindowPosVal - window->Size * window->SetWindowPosPivot, 0); // Position given a pivot (e.g. for centering)
|
||||
else if ((flags & ImGuiWindowFlags_ChildMenu) != 0)
|
||||
window->Pos = FindBestWindowPosForPopup(window);
|
||||
else if ((flags & ImGuiWindowFlags_Popup) != 0 && !window_pos_set_by_api && window_just_appearing_after_hidden_for_resize)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue