Re: [AD] Using system mouse cursor

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


Evert Glebbeek wrote:
I meant, they are different in how Allegro handles them.

There shouldn't be much of a difference between hardware and system cursors. The only difference should be if the hardware cursor being requested has a user-specified bitmap. If not, try to set the system cursor. If not, or if that doesn't work, set the default cursor Allegro has. Why should they be any different beyond that?

There is a difference internally, because the mouse_sprite would be NULL for a true system cursor, but not for a software or custom hardware cursor - nor for Allegro's default cursor.

Why don't you set mouse_sprite to NULL for custom hardware cursors? Or turned around, why don't you set mouse_sprite to the Allegro default when a system cursor is set? Consistency in setup (externally and internally) will make things much easier later on.

Yes - but this is not how I originally designed the set_mouse_cursor() API. In my original API, there were two mechanisms, one for system cursors and one for custom (hard/soft) cursors.

But since Allegro is not designed for that kind of seperation, we should make as few differences as possible. The majority of API seperation should be between software and hardware cursors (and even this should be kept minimal), with system cursors being tacked on to hardware cursors (and implicitly inherit the same behavior from them).

- Kitty Cat




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