On Thu, Jul 17, 2008 at 12:14 PM, simpsus_science
<[EMAIL PROTECTED]> wrote:
>
> Hallo,
>
> in 1.0 I had to control the main loop myself, so i could check if i am
> paused or not. Happily, this cpu thrashing is gone with 1.1. But, how
> would I implement pause now?
>

I think it will help if you consider `pausing' a separate aspect that
isn't intertwined with the event loop.  For example, the action of
pausing could result in a flag being set on a physics engine which
stops updating positions on managed objects.  Or you have intermediary
event handlers (maybe a function decorator - @pausable) which obey a
global paused flag and block inputs to certain objects, etc.  Exactly
what you do depends on the structure of your application, but in any
case. you're better off not coupling a high-level application concern
such as pausing with low-level event handling.  Hope this helps.

Cheers,
-- 
\\\\\/\"/\\\\\\\\\\\
\\\\/ // //\/\\\\\\\
\\\/ \\// /\ \/\\\\
\\/ /\/ / /\/ /\ \\\
\/ / /\/ /\ /\\\ \\
/ /\\\ /\\\ \\\\\/\
\/\\\\\/\\\\\/\\\\\\
 doryuu

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