# Custon colored mousepointer

**URL:** <https://discourse.libsdl.org/t/custon-colored-mousepointer/5621>\
**Category:** SDL Development\
**Created:** [December 15, 2001, 9:11am UTC](https://discourse.libsdl.org/t/custon-colored-mousepointer/5621 "2001-12-15T09:11:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pascal\_Bourut](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/p/ccd318/32.png) [@Pascal\_Bourut](https://discourse.libsdl.org/u/Pascal_Bourut)\
**Post date:** [December 15, 2001, 9:11am UTC](https://discourse.libsdl.org/t/custon-colored-mousepointer/5621/1 "2001-12-15T09:11:01Z")

</div>

Hello,

I’d like to change the pointer  
when that game is in a certain state, such as when a movement destination  
is selected, a target is selected etc (this is for a wargame).

It would be nice to change the pointer to something else, such as a  
crosshair or similar just so that the player knows what is going on.

In the doc, I just read how to create a new mouse cursor from an XPM but  
with this, cursor can only be black and white, no ?!

So, does someone know the best way to create a custom colored mousepointer  
???

TIA  
CU–  
Pascal “Toweld” Bourut  
toweld at [rocketmail.com](http://rocketmail.com)  
[http://toweld.free.fr/towbowltactics/](http://toweld.free.fr/towbowltactics/)  
Up The Irons !!!

---

<div class="post-metadata">

**Author:** ![Ernest\_Pazera](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/e/8e8cbc/32.png) [@Ernest\_Pazera](https://discourse.libsdl.org/u/Ernest_Pazera)\
**Post date:** [December 15, 2001, 9:32am UTC](https://discourse.libsdl.org/t/custon-colored-mousepointer/5621/2 "2001-12-15T09:32:01Z")

</div>

simply:

use a surface which loads a bitmap. give it a color key, and accommodate the  
“hotspot” somehow with a pair of x,y values. render this after everything  
else has been rendered, before calling SDL\_Flip or SDL\_UpdateRect.\>From: “Pascal Bourut” \<pascal.bourut at [wanadoo.fr](http://wanadoo.fr)\>

> Reply-To: sdl at [libsdl.org](http://libsdl.org)  
> To: sdl at [libsdl.org](http://libsdl.org)  
> Subject: [SDL] Custon colored mousepointer  
> Date: Sat, 15 Dec 2001 18:04:46 -0000
> 
> Hello,
> 
> I’d like to change the pointer  
> when that game is in a certain state, such as when a movement destination  
> is selected, a target is selected etc (this is for a wargame).
> 
> It would be nice to change the pointer to something else, such as a  
> crosshair or similar just so that the player knows what is going on.
> 
> In the doc, I just read how to create a new mouse cursor from an XPM but  
> with this, cursor can only be black and white, no ?!
> 
> So, does someone know the best way to create a custom colored mousepointer  
> ???
> 
> TIA  
> CU
> 
> –  
> Pascal “Toweld” Bourut  
> toweld at [rocketmail.com](http://rocketmail.com)  
> [http://toweld.free.fr/towbowltactics/](http://toweld.free.fr/towbowltactics/)  
> Up The Irons !!!
> 
> * * *
> 
> SDL mailing list  
> SDL at [libsdl.org](http://libsdl.org)  
> [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)

* * *

Send and receive Hotmail on your mobile device: [http://mobile.msn.com](http://mobile.msn.com)
