JOGL Update: New NEWT Mouse Features
Posted by
Sven Gothel on
Oct 13, 2011; 10:45pm
URL: https://forum.jogamp.org/JOGL-Update-New-NEWT-Mouse-Features-tp3420099.html
http://jausoft.com/blog/2011/10/13/new-newt-mouse-features/+++
After doing all the Android work, I thought I need a break and finally
added the NEWT mouse features some are desiring:
Visibility
set pointer visible or invisible
Confined
confine pointer to window, or not
Warp
set mouse position within the window
This is NEWT’s minimal API addition in this regard.
The InputEvent’s modifiers expose the above states confined and invisible
which can be easily queried and reacted upon in the event listener, as shown in GearsES2.
This allows you to have a game-like mouse navigation, where you control the direction w/o pressing the mouse button (which you may need for something else), not seeing the mouse pointer and last but not least,
not leaving the game window.
Tested w/ TestGearsES2NEWT, using GearsES2.
This is currently impl. for X11 and Windows and I am currently adding these to our OSX port.
Since the default operation for these features are NOP and touchscreen don’t require any of those, there is no work to do on Android in this regard.
+++