Re: [AD] Using system mouse cursor |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> Well, I did have an idea. First, the function would be named
> select_hardware_cursor. It would also be paired with a function
> set_hardware_cursor, to which you can pass bitmaps for the different
> cursor states (or NULL for system or Allegro default, depending on
> what's available).
I think this may be a bit too complicated. I actually had to read it twice
to understand what you meant. Basically, what we have now is thwe
following division of mouse pointers:
Custom pointer:
soft cursor (Allegro draws this)
hard cursor (OS/WM draws this)
System pointer:
system cursor (OS/WM draws this)
where the division is made between custom pointers and default OS pointers,
and whoever is responsible for drawing the custom pointer is irrelevant as
far as the API is concerned.
Your proposal, if I understand correctly, is to change this to a division
based on who draws the pointer, so:
Allegro draws the pointer:
Custom cursor (soft cursor)
System draws the pointer:
Custom cursor (hard cursor)
System default cursor
I think I prefer the first (current) division: if I specify my own pointer,
I don't really want to write special code to use the hardware cursor if
possible. It also fits nicer in to the existing framework. I don't know
what plans were made for the new mouse API for Allegro 5, but maybe this
is something that we could use there?
> These functions would also behave exactly the same for drivers where
> there is a real hardware (not OS) cursor.. except passing NULL to
> set_hardware_cursor would set it to Allegro's default cursor(s).
Having thought about this a bit more, I now think that it actually does
make more sense to display the OS mouse pointer if we are in a windowed
mode and the mouse_sprite is NULL than displaying the Allegro arrow. It's
going to require me some more work on the mouse display code to make sure
this works properly and doesn't accidentally break anything though, and
I'd rather postpone that until after 4.1.16 WIP.
Evert