Re: [AD] Using system mouse cursor |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Chris wrote:
Peter Wang wrote:
In the first screen of exmouse: Move your mouse to the edge of the
window, such that the mouse_x,y values stop changing, e.g. at
319,199. If you keep pushing at the edge of the screen, the mouse
mickey values are supposed to keep changing and the mouse cursor
remains trapped inside the window.
get_mouse_mickeys isn't supposed to retain the actual mouse position
while giving you differences.
Right. That's not what I meant.
In Windows, get_mouse_mickeys will only work while your program has
focus until hitting the edge of the desktop in windowed modes
(fullscreen modes are infinite).. in X, the function works until it
leaves the window area. It's a design difference between X and
Windows, but in either case neither of them are supposed to move the
mouse back to where it was last I knew.
As I said, warping the mouse cursor back to the centre of the screen was
a hack from XWinAllegro days (pre-Allegro 3.9.x) exactly to get around
this limitation. It's supposed to get behaviour more approximate to
what you would have got on DOS.
The way you do that is with set_mouse_position (or set_mouse_range if
you can get the OS to trap the mouse in the window, which I don't
believe it does currently).
Do you mean that the user should be responsible for calling
set_mouse_position() on platforms where he wants get_mouse_mickeys() to
have an infinite range of movement?
Peter