On Sun, Apr 26, 2009 at 12:45 PM, Tristam MacDonald <[email protected]> wrote: > On Sun, Apr 26, 2009 at 3:25 PM, Colin Bean <[email protected]> wrote: >> >> Also, if you're using 1.1 beta 2 or above, you can use the window's >> 'invalid' attribute. Setting it to False in your mouse event and then >> to True in your update function will do what you want, I think (but I >> haven't tested this, YMMV). > > In just tried that (and updated to the head of the 1.1-maintenance branch in > SVN, to make sure). In fact, I am completely unsure if the invalid flag does > *anything* - and see http://code.google.com/p/pyglet/issues/detail?id=399 > > -- > Tristam MacDonald > http://swiftcoder.wordpress.com/ > > > >
I know the invalid flag does something (using 1.1.2), because at one point I was trying to do the opposite of what you're doing: not update the window when a scheduled function was called, but only on a mouse move. The invalid flag worked for that: looking back at what I did it seems like the key was to set win.invalid = False at the end of my on_draw function, then set it to True in the handler functions after that. So maybe try setting it to false in your draw function. I'd be happy to send you the code I was working on, but it's pretty ugly at this point. Colin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
