mirror of
https://github.com/ocornut/imgui.git
synced 2024-12-03 21:59:15 +08:00
Popup: Fixed popup initial frame reading MousePos again instead of the value already stored within the CurrentPopupStack in the previous frame. Doesn't make a big difference here, but will do as gamepad/keyboard navigation will set its own popup position. (#323)
This commit is contained in:
parent
91e1c56da6
commit
6f7da2f9f2
@ -3937,7 +3937,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
|
||||
// Popup first latch mouse position, will position itself when it appears next frame
|
||||
window->AutoPosLastDirection = -1;
|
||||
if ((flags & ImGuiWindowFlags_Popup) != 0 && !window_pos_set_by_api)
|
||||
window->PosFloat = g.IO.MousePos;
|
||||
window->PosFloat = g.CurrentPopupStack.back().MousePosOnOpen;
|
||||
}
|
||||
|
||||
// Collapse window by double-clicking on title bar
|
||||
|
Loading…
Reference in New Issue
Block a user