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

[pygame] Cursors?




Hi,

I noticed that mouse pointers refuse to load
using pygame.mouse.set_cursor() in a special case. The XBM files are
normal C code, and the actual data is defined in an arrat of bytes,
defined like this:

static char cursor_bits[] = {
  0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x00, 
  ....
}; 

However, if the definition has an extra "unsigned" the cursor refuses to
load and gives the error:

  File "./gui/dialog.py", line 275, in setWaitCursor
    pygame.mouse.set_cursor ( *Dialog.waitcursor )
ValueError: bitmasks must be sized width*height/8

I was searching for a while before I noticed that extra "unsigned" there.
I think it should be legal to have it there, as the data is supposed to be
a positive byte value? The file was spit out by ImageMagick's "convert".

Comments?

-- 
         In the Beginning there was nothing, which exploded.
                                        -- Terry Pratchett, Lords and Ladies

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