I'm trying to figure out how to get the mouse wheel direction in a windowed screen with opengl subsytem
The SetWindowCallback tip I posted doesn't work once the screen is opened and I don't know if gdk_add_client_message_filter ()
would work either.
window callback
Any ideas?
mouse wheel
mouse wheel
Windows 11, Manjaro, Raspberry Pi OS


-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: mouse wheel
Hello Idle
PB's own ExamineMouse() + MouseWheel() does not work? I have used it with a windowed screen, but not with openGL.
PB's own ExamineMouse() + MouseWheel() does not work? I have used it with a windowed screen, but not with openGL.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: mouse wheel
When using OpenGL, I start with SDL to create the window for me:
Then, to get your wheel events:
Code: Select all
Screen = SDL_SetVideoMode_(width, height, depth, #SDL_OPENGL | #SDL_FULLSCREEN)
Code: Select all
While SDL_PollEvent_(@Event.SDL_Event)
Select Event\Type
Case #SDL_MOUSEBUTTONDOWN
If Event\button\button = 4
MouseWheels + 1 ;will add to the scrolling
ElseIf event\button\button = 5
MouseWheels - 1 ;will subtract from the scrolling
EndIf
EndSelect
Wend