[SDL] Re: Colorful Mousecursrors with SDL

Sebastian Beschke s.beschke at gmx.de
Thu Jan 27 07:55:42 PST 2005


In the case of a scrolling background, the easiest and most efficient 
solution is usually to repaint the whole screen each frame.

For the few cases where it isn't, there is a technique called "Dirty 
rects", which you might try googling for. But it's a whole lot more 
complicated than just repainting everything, and usually not worth the 


Daniel schrieb:
> Hi :)
>>1. Hide the system cursor (check SDL API)
>>2. When you draw your graphics, also draw a SDL_Surface at the
>>location of the mouse cursor. Voila!
> Thank you for the answer. the cursor works now, but there is one problem 
> with it:
> When I move the curosr I must repaint the Place, from which the cursor had 
> moved. How can I do that? I know, how I can to it theoratically, but there 
> is the problem, that the background, which has to be repainted can scroll. 
> So I don't know, what I have to paint there.
> Thanks in advance
> Daniel 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl

More information about the SDL mailing list