Examples: Allegro, Apple, DirectX9/10/11, Glfw+Vulkan :Added support for horizontal mouse wheel. (#1463)

This commit is contained in:
omar
2018-01-20 12:36:59 +01:00
parent 0b1fecb792
commit 7dea158175
6 changed files with 19 additions and 7 deletions

View File

@ -221,6 +221,9 @@ IMGUI_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT msg, WPARAM wPa
case WM_MOUSEWHEEL:
io.MouseWheel += GET_WHEEL_DELTA_WPARAM(wParam) > 0 ? +1.0f : -1.0f;
return 0;
case WM_MOUSEHWHEEL:
io.MouseWheelH += GET_WHEEL_DELTA_WPARAM(wParam) > 0 ? +1.0f : -1.0f;
return 0;
case WM_MOUSEMOVE:
io.MousePos.x = (signed short)(lParam);
io.MousePos.y = (signed short)(lParam >> 16);