changeset 701:26f19ed98701

add: mouse wheel in windows (untested)
author Sam <sam@basx.dev>
date Sat, 20 May 2023 23:26:17 +0700
parents abc0d97392cb
children 8a5521174cc0
files src/semicongine/platform/windows/window.nim
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/semicongine/platform/windows/window.nim	Sat May 20 23:21:03 2023 +0700
+++ b/src/semicongine/platform/windows/window.nim	Sat May 20 23:26:17 2023 +0700
@@ -56,6 +56,8 @@
     currentEvents.add(Event(eventType: MouseReleased, button: MouseButton.Mouse3))
   of WM_MOUSEMOVE:
     currentEvents.add(Event(eventType: events.MouseMoved, x: GET_X_LPARAM(lParam), y: GET_Y_LPARAM(lParam)))
+  of WM_MOUSEWHEEL:
+    currentEvents.add(Event(eventType: events.MouseWheel, amount: GET_WHEEL_DELTA_WPARAM(wParam)))
   else:
     return DefWindowProc(hwnd, uMsg, wParam, lParam)