[Plib-users] Mouse movement... grabbing/locking pointer in window?
Brought to you by:
sjbaker
From: Cameron B. <ko...@da...> - 2005-11-25 02:07:43
|
Hi, Im looking to do FPS style view control, which Im figuring is setting view angle based on change in mouse position (and that seems to work fine), but the trouble is that in window mode, the mouse actually moves out of the window. (I can keep getting events, but it just seems like an ugly solution, especially with mouse buttons too). So, I guess Im wondering if there is a way to 'grab' the mouse pointer (or, more hacky, to warp it back to the window center) while in FPS steering mode. (I guess the problem is 'what happens if it crashes' and keeps the mouse?) Ive found XWarpPointer, but thats hardly portable and the same problem must exist under windows/mac. (It just seems like something many people would need, and that makes me think that I may be missing something obvious). (Warp would seem to avoid the 'what happens if it crashes' problem.) (I did some looking inside plib and Im sure I can work out what values to pass to XWarpPointer, but it just seems like it is crying out for a pw function. :) Which leads me to ask, is there a wiki or similar for plib? Im sure Im reinventing the wheel here (which is fun, but still... :). cheers, cam -- / `Rev Dr' cam at darkqueen.org Roleplaying, virtual goth \ < http://darkqueen.org Poly, *nix, Python, C/C++, genetics, ATM > \ [+61 3] 9809 1523[h] skeptic, Evil GM(tm). Sysadmin for hire / ---------- Random Quote ---------- Brain fried -- Core dumped |