SDL Cursors in color?

Using the example code on the manpage for SDL_SetCursor, I can get the
cursor to change, but if I try to add colors other than black/white or None
to the pixmap, I get no colors, and usually the system cursor.

Is there a way to do custom cursors in color?

I writing a game in which the user aims with the mouse, so I’m going for a
red crosshair sort of thing here…

TIA

-HaB_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

“HaB JacKaL” wrote in message
news:mailman.1017803103.25337.sdl at libsdl.org

Using the example code on the manpage for SDL_SetCursor, I can get
the
cursor to change, but if I try to add colors other than black/white
or None
to the pixmap, I get no colors, and usually the system cursor.

Is there a way to do custom cursors in color?

Yes: draw it yourself.–
Rainer Deyke | root at rainerdeyke.com | http://rainerdeyke.com

“HaB JacKaL” <@HaB_JacKaL> wrote in message
news:mailman.1017803103.25337.sdl at libsdl.org

Using the example code on the manpage for SDL_SetCursor, I can get
the
cursor to change, but if I try to add colors other than black/white
or None
to the pixmap, I get no colors, and usually the system cursor.

Is there a way to do custom cursors in color?

Yes: draw it yourself.

Er…sorry. Isn’t that what I was doing? I was editing the pixmap myself,
and adding color to it, and changing the shape of it. Or do you mean
something else?

-HaB_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

“HaB JacKaL” wrote in message
news:mailman.1017803103.25337.sdl at libsdl.org

Using the example code on the manpage for SDL_SetCursor, I can get
the
cursor to change, but if I try to add colors other than black/white
or None
to the pixmap, I get no colors, and usually the system cursor.

Is there a way to do custom cursors in color?

Yes: draw it yourself.

Er…sorry. Isn’t that what I was doing? I was editing the pixmap
myself,
and adding color to it, and changing the shape of it. Or do you mean
something else?

No, you are trying to use SDL_SetCursor() to set a cursor for SDL to draw,
yes? That isn’t drawing it yourself, that’s SDL drawing it for you. Use
SDL_BlitSurface() instead and you will be drawing it yourself. Make sense?
:slight_smile:

-Jason

----- Original Message -----
From: feelthel0ve@hotmail.com (HaB JacKaL)
To:
Sent: Tuesday, April 02, 2002 10:41 PM
Subject: Re: [SDL] SDL Cursors in color?