mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 20:18:47 +02:00
Viewport: Virtual mouse position are patched immediately when viewports are moved in the virtual space, avoiding interaction glitchs on a resizing frame. (#1542)
This commit is contained in:
@ -643,6 +643,7 @@ struct ImGuiContext
|
||||
ImGuiViewportP* MousePosViewport;
|
||||
ImGuiViewportP* MousePosPrevViewport;
|
||||
ImGuiViewportP* MouseHoveredPrevViewport;
|
||||
ImGuiID MouseClickedPosViewportId[5]; // For rarely used fields we only compare to, store viewport ID only so we don't have to clean dangling pointers
|
||||
|
||||
// Navigation data (for gamepad/keyboard)
|
||||
ImGuiWindow* NavWindow; // Focused window for navigation. Could be called 'FocusWindow'
|
||||
@ -771,6 +772,7 @@ struct ImGuiContext
|
||||
CurrentViewport = NULL;
|
||||
MousePosViewport = NULL;
|
||||
MousePosPrevViewport = MouseHoveredPrevViewport = NULL;
|
||||
memset(MouseClickedPosViewportId, 0, sizeof(MouseClickedPosViewportId));
|
||||
|
||||
NavWindow = NULL;
|
||||
NavId = NavActivateId = NavActivateDownId = NavActivatePressedId = NavInputId = 0;
|
||||
|
Reference in New Issue
Block a user