Getting the images for allegro's system cursors
Edgar Reynaldo

Hi peeps!

Just wondering, is it feasible to draw the current mouse cursor onto a bitmap somehow? It's not currently implemented. I want to grab the system mouse cursor images so I can draw them for a user to select using its icon. It's for a demo program. It looks like on Windows it is stored as an HICON. Haven't explored enough to know about the other platforms though.

Is anyone else interested in having some kind of option to draw the mouse pointer onto an ALLEGRO_BITMAP in the A5 API?

Bruce Pascoe

Hm, it's a neat feature idea, but seems a little out of Allegro's scope.

Edgar Reynaldo

A4 let you draw the mouse with software, so it's not unprecedented. :/

Elias

A5 allows custom cursors (al_create_mouse_cursor) just like A4. That's the closest you can get to grabbing system cursors though. I think this feature would not be possible in general since some cursor themes have animated cursors.

Mark Oates

You mean like changing the cursor to a pre-defined system cursor, like pointing-finger, resize arrows, etc.?

Edgar Reynaldo

Yes, you can change the cursor at will, even to system defined cursors, but you can't get the image out of allegro. And a screenshot never captures the cursor, only the desktop, so even if I wanted to grab the cursors manually, I still can't. :-/

Thread #615990. Printed from Allegro.cc