Fwd: Re: [AD] Mouse cusor documentation |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
---------- Forwarded Message ----------
Subject: Re: [AD] Mouse cusor documentation
Date: Wednesday 06 October 2004 7:20 am
From: Chris <kcat@xxxxxxxxxx>
To: rpatters@xxxxxxxxxx
For some reason, SourceForge has blacklisted strangesoft's emails so I
can't send emails directly. Thanks for kazzmir for forwarding the first,
and CGames for this. Hopefully strangesoft will be removed the blacklist
soon enough.
Elias Pschernig wrote:
> All I think should be there is a
> way to not have to display a software cursor from a timer in order to
> know if a HW cursor can be used, as is the current design.
If the mouse is being drawn from a timer, the HW_MOUSE flag bit will
never be set. The HW_MOUSE bit will only be set when its being used (or
if show_mouse(NULL) is set and the current pointer is "legal").
> That's what I'm talking about - I don't want to use the
> software-mouse-drawn-from-a-timer at all, instead either a HW mouse or a
> mouse I draw myself (e.g. in every frame).
Then when you setup:
enable_hardware_mouse();
if(gfx_capabilities & ALLEGRO_HW_MOUSE)
show_mouse(screen);
And when you draw:
if(!(gfx_capabilities & ALLEGRO_HW_MOUSE))
draw_sprite(screen, mouse_sprite, mouse_x, mouse_y);
> The only difference is to avoid the little cludge where
> show_mouse() automatically enables drawing from a timer currently.
Only if you don't pass it screen or NULL.
- Kitty Cat
-------------------------------------------------------
--
Regards,
Ryan Patterson <mailto:rpatters@xxxxxxxxxx>