This patch adds support for the horizontal mouse wheel in ImGui. It
affects windows that can be scrolled, as long as the Ctrl key is not
being pressed.
The scrolling speed has been set empirically so that it matches the
scrolling speed on the Firefox browser when the horizontal wheel is
used.
Internally, it adds a MouseHorizWheel to ImGuiIO, which is then used in
NewFrame to scroll the current window.
The SDL/GL2, SDL/GL3, GLFW/GL2 and GLFW/GL3 examples has been modified
to use it.
window->DC.CursorMaxPos.x+=window->Scroll.x;// SizeContents is generally computed based on CursorMaxPos which is affected by scroll position, so we need to apply our change to it.
window->DC.CursorMaxPos.y+=window->Scroll.y;// SizeContents is generally computed based on CursorMaxPos which is affected by scroll position, so we need to apply our change to it.
ImVec2MousePos;// Mouse position, in pixels. Set to ImVec2(-FLT_MAX,-FLT_MAX) if mouse is unavailable (on another screen, etc.)
boolMouseDown[5];// Mouse buttons: left, right, middle + extras. ImGui itself mostly only uses left button (BeginPopupContext** are using right button). Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
floatMouseWheel;// Mouse wheel: 1 unit scrolls about 5 lines text.
floatMouseHorizWheel;// Horizontal mouse wheel
boolMouseDrawCursor;// Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor).