Hi Daniel

As I wrote earlier I forgot to add
key_handler = key.KeyStateHandler()

def update(dt):
    window.push_handlers(key_handler)
which was in my code but I didn't write it down. This caused the 
accumulation (apparently?).
I have used this key_handler to check if a button is currently pressed down,
and I was surprised that it affected the other stuff.
If in the above I comment out 
window.push_handlers(key_handler)
and put pass,
'Ole' replaces the original message and no further changes happen.
Is there a good explanation for why messing with key_handler affects 
on_key_press stuff?

I think I may do what Greg suggested and try to define the handlers once so 
that they
trigger the appropriate functions in the game scenes. This seems rather 
safe,
unless there are performance issues or other unforeseen problems.

Thanks for the example though!

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to