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.

But be aware that these features will be promoted to the next release RC4,
so you would need to wait or use the autobuilds, see Downloading the latest automatic build.