Pygame mouse cursor load/unload

MRAB python at mrabarnett.plus.com
Mon Mar 11 21:54:02 CET 2013


On 11/03/2013 20:43, Alex Gardner wrote:
> On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote:
>> I am in the process of making a pong game in python using the pygame library.  My current problem is that when I move the mouse, it turns off as soon as the mouse stops moving.  The way I am doing this is by making the default cursor invisible and using .png files as replacements for the cursor.  Perhaps my code would best explain my problem.  I will take help in any way that I can.  Here are the links that contain my code:
>>
>>
>>
>> Main class:  http://pastebin.com/HSQzX6h2
>>
>> Main file (where the problem lies):  http://pastebin.com/67p97RsJ
>>
>>
>>
>> If the links yield nothing, please let me know (agardner210 at gmail.com)
> I tried to append what you told me to.  Now it appears that I have a syntax error!  I checked my indentations and they look fine to me, but I get this error:
>
>      paddle_pos = pygame.mouse.get_pos()
>                                        ^
> IndentationError: unindent does not match any outer indentation level
>
> I added "paddle_rect.center = pygame.mouse.get_pos()" and removed the double blank paddles.  I have no idea if it works though because of the parse error!  New code:  http://pastebin.com/maqWCdNB
>
It's complaining because the preceding 'for' loop is indented more that
that line.



More information about the Python-list mailing list