mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Window: Fixed using non-zero pivot in SetNextWindowPos() when the window is collapsed. (#3433)
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user