mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
Scrolling: Made mouse-wheel scrolling lock the underlying window until the mouse is moved again or until a short delay expires (2 seconds). This allow uninterrupted scroll even if child windows are passing under the mouse cursor. (#2604)
This commit is contained in:
@ -868,6 +868,9 @@ struct ImGuiContext
|
||||
ImGuiWindow* HoveredWindow; // Will catch mouse inputs
|
||||
ImGuiWindow* HoveredRootWindow; // Will catch mouse inputs (for focus/move only)
|
||||
ImGuiWindow* MovingWindow; // Track the window we clicked on (in order to preserve focus). The actually window that is moved is generally MovingWindow->RootWindow.
|
||||
ImGuiWindow* WheelingWindow;
|
||||
ImVec2 WheelingWindowRefMousePos;
|
||||
float WheelingWindowTimer;
|
||||
|
||||
// Item/widgets state and tracking information
|
||||
ImGuiID HoveredId; // Hovered widget
|
||||
@ -1058,6 +1061,8 @@ struct ImGuiContext
|
||||
HoveredWindow = NULL;
|
||||
HoveredRootWindow = NULL;
|
||||
MovingWindow = NULL;
|
||||
WheelingWindow = NULL;
|
||||
WheelingWindowTimer = 0.0f;
|
||||
|
||||
HoveredId = 0;
|
||||
HoveredIdAllowOverlap = false;
|
||||
|
Reference in New Issue
Block a user