[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Cursors again



On Thu, 4 Jan 2001, ShredWheat wrote:

>at this point cursors can use some more attention. there is an all
>python module named pygame.cursors which for now simply contains
>the data for two cursors. (argh, and the diamond one is bitswapped)

I'll look at that module then to find out if I can generate cursors
manually that would work now.

>i also think simple cursors defined by strings (like above) make
>a lot of good sense. the good news is there is already code to 
>do this in the sdl documentation. my current plan is to put some
>sort of compile function in the cursors module. the compile will
>take the strings and turn it into a sequence of bytedata which
>can be passed to pygame.mouse.set_cursor()

Now this sounds like it would be really what I'm looking for.

>my current project is tackling the problems in surfarray. it will
>be a couple days before i can get to cursors, so the door is wide
>open for someone else to enhance that cursor module (wink wink)

I don't have the necessary knowledge for that yet, I'm afraid. I don't
want to go destroying stuff. 

>just in case, the compiler can be found here,
>http://sdldoc.sourceforge.net/current/sdlcreatecursor.html .
>(should be easy to convert to python) i liked the args jan
>gave as an example earlier, but i think the size argument might
>be a little redundant.

Had a look at the code. Quite straightforward, but I have no idea as to
how do byte/bit-manipulation in Python. Is there even a byte datatype? I'm
still a newbie when it comes to Python...

As for the size argument: yes, it is redundant, you are right. The width
is the length of the first string, and the height the number of strings.

--------------------+--------------------------------------------------------
Jan 'Chakie' Ekholm |     Balrog New Media    http://www.balrog.fi/
   Linux Inside     | I'm the blue screen of death, nobody hears your screams

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org