Hey!
My suggestion is adding support for mouse confinement in windowed mode. (clipping)
This isn't really an extremly important feature,
normally it's ok if the mouse isn't locked to the window.
It can bring some annoyment though especially in point and click games,
in my case an RPG game, if you happen to run in windowed mode.
My first idea was to intercept mouse events, locking the mouse in middle
window and handling the cursor virtually.
It has one problem though, GUI won't function since it depend on the event system,
i was hoping to use the native GUI system (although with extensions).
It would work to use "custom" device creation and make sure
coordinates are clipped, but if anything calls getPosition we're screwed.
I could make a little patch for this, incase anyone else is interested.
/Legion
Windowed mode mouse clipping suggestion
-
- Posts: 34
- Joined: Sat Jul 30, 2005 9:45 am
- Contact:
This is already possible on Windows using a win32 function "ClipCursor()" no patch needed.
Cursor will *NOT* leave the window. You can also set an abitrary rect of any size to restrict the cursor to. When you pause your game just free the cursor using ClipCursor(NULL).
Code: Select all
GetWindowRect(gHwnd, &gWindowMouseRegion);
gWindowMouseRegion.top+=gScreenHeight/2;
gWindowMouseRegion.left+=70;
gWindowMouseRegion.bottom-=20;
gWindowMouseRegion.right-=70;
ClipCursor(&gWindowMouseRegion);