> mouse_drag events were stacking up

Am I correct in inferring from that that there can be multiple mouse drag
events sitting in a queue somewhere?

G

On Tue, Jun 7, 2011 at 5:07 PM, Jonathan Hartley <[email protected]>wrote:

> Some guesswork:
>
> If you're doing a batch.draw() (inside camera.render) on every on_draw
> event, then I don't think you also need to call batch.draw() (inside
> camera.moveScreen) in on_mouse_drag. I'd suggest deleting the call to
> batch.draw() in moveScreen.
>
> Possibly this is making the on_mouse_drag handler take to long to
> execute? So mouse_drag events were stacking up without chance to do
> the on_draw events inbetween them? Or maybe this has nothing to do
> with your problem.
>
> Speculatively yours,
>
>  Jonathan
>
>
>
> On Jun 6, 11:29 am, Duck <[email protected]> wrote:
> > I'm creating a framework for a grid based game and I'm trying to use
> > the events to move the map around. This works fine with the keyboard
> > events, but I'm having some trouble with on_mouse_drag. If I keep
> > moving the mouse around fast enough, the fps counter freezes and the
> > map doesn't move untill I stop the mouse. The mouse drag events are
> > firing rapidly though. Are the events somehow blocking the screen from
> > drawing again, or am I doing something totally wrong?
> >
> > Code is posted on pastebin:http://pastebin.com/Mj9yCA7r
> >
> > Also, if you see anything stupid, please tell me.
> >
> > Thanks,
> > Duck
>
> --
> 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.
>
>

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