On Sat, Feb 7, 2009 at 8:04 AM, Red15 <[email protected]> wrote:
>
> Well not really, suppose this :
>
> I have subclassed pyglet.window.Window and am acting on my on_draw
> event.
>
> Inside the window.on_draw I put a window.clear(), since this is the
> first handler it will be called last so in effect clearing everything
> I have just drawn...
> Right now i solve it by making the window.on_draw dispatch another
> event right after clearing the window and I called it "draw" instead
> of "on_draw".
>
> I guess there are other better ways to solve, if so I would like to
> hear them, but to me a (relatively) simple solution would be to allow
> inserting push_handlers at a certain index position maybe ?

It's a fair point that on_draw isn't useful with stacking -- it should
have been a special case that calls in reverse order.  It may be
changed, in some future unplanned backward-incompatible version.  In
the meantime, you can't really use the event stack for your drawing --
I typically maintain a separate stack of draw handlers in the
application and call them myself.

Alex.

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

Reply via email to