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

[pygame] Cursors again




A while ago I asked about custom mousepointers (cursors), and was told
that this is still a weak part in pygame. I was wondering wether any
progress has been made in that area?

I could happily use something like:

    cursor = [ '        ',
               '   ..   ',       
               '   .X   ',       
               ' ...X.. ',       
               ' XXXXXX ',       
               '   .X   ',       
               '   .X   ',       
               '        ' ]

pygame.mouse.set_cursor( (8,8), (4,4), cursor, 'X', '.', ' ' )

Where parameters are:
	
	(8,8)  - size of the cursor
	(4,4)  - hotspot location
	cursor - list of strings (8 strings a 8 characters)
	'X'    - character for a black pixel
	'.'    - character for a white pixel
	' '    - character for a transparent pixel

Maybe cursors should be created manually using pygame.mouse.Cursor() which
could return a cursor object and the set using pygame.mouse.set_cursor
which would take as argument a predefined cursor?

What do you think? I know this is asking for much, but at this stage I
need the cursors so that I can tell that player the state the game is in,
i.e. what is expected from the player. If this is planned or just not
doable it is ok. 

Does anybody know how I can create the byte arrays in Python that are
needed for the current version of pygame.mouse.set_cursor? I can use that
if I only know how... :-)

--------------------+--------------------------------------------------------
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