Mercurial > games > semicongine
changeset 240:4f17d04b8291
add: mouse wheel in windows (untested)
author | Sam <sam@basx.dev> |
---|---|
date | Sat, 20 May 2023 23:26:17 +0700 |
parents | f05497ef8fd2 |
children | 671b9267a533 |
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)