LWJGL just for mouse capture?

Started by NateS, December 06, 2009, 04:07:36

Previous topic - Next topic

NateS

I have an app that doesn't use OpenGL:
http://code.google.com/p/pg3b/
I have the need to make the mouse disappear and to disable keyboard input until a hot key is pressed. I can probably handle the keyboard in Swing, as long as my app has focus. Would I be able to capture the mouse with LWJGL so that it can't be seen and the user can't click to focus another window?

kappa

your unlikely to be able to use mouse capture without the lwjgl's Display window, since its mouse and keyboard classes are pretty much tied to that.

a rather long shot you could try is a 1*1 pixel lwjgl window using lwjgl's setParent to embed it into swing and then catch the mouse, it might work.