Re: [AD] Using system mouse cursor

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> It looks good to me, except I'm not sure about select_os_cursor. Allegro
> doesn't really busy up the system like a normal app would. And I would 
> think if you're displaying the default system cursor, the OS would 
> change it to busy, busy-waiting, or whatever automatically for you, 
> wouldn't it?

Nope. It has no real way to tell when it should change the cursor.
If you allow the user to let the OS draw the cursor, then I think you
should also allow them to change its shape, since that is a trivial thing
to do anyway. Otherwise, we will probably be getting feature requests for
it anyway and adding that functionality afterwards will only clutter up the
API more. ;)

> I think the behavior of set_mouse_sprite(NULL) should change slightly 
> for the hardware mouse mode.. that if the system has a default cursor, 
> it selects that instead of resetting to the default Allegro cursor.

I disagree. What if you actually want to hide the mouse cursor temporarily
for whatever reason (displaying a cinematic sequence, say)? Hardware mouse
mode is like normal mouse mode, but with the OS drawing the cursor rather
than Allegro. Call select_os_cursor() after show_mouse(NULL) if you want
the default one. This change would also break the API, since the behavior
of show_mouse(NULL) has always been to hide the mouse cursor in either soft
or hardware mode.

Evert





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/