Just a thought here . . . Could you get the time window for when the events are inappropriate and pre process queued events such that you ignore any that fall in the dead space (dont handle them, just purge them). I don't know if the event structure has time info with it, but it seems like it must. If it doesn't you could queue your own event at the beginning of the inappropriate time, and then at the end of it, sort of like a tag, and then you could ignore all events between by purging them.
Paul -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Robert Purcell Sent: Wednesday, July 31, 2002 12:17 PM To: Palm Developer Forum Subject: Discarding Events? Hi Everyone, I'm currently working on a game that requires some "deadtime" to update animations between user input. The problem is that if the user causes any events while the animation is being updated, the events are queued, and when the animation is complete, all the queued events execute. Obviously, this makes the game very difficult to control. If the user taps the screen only when it's "appropriate", everything works just fine, but I need to account for events at unpredictable times. How can I discard events during my animation routine, and then re-enable the event queue once my animation is complete? I don't want the OS to queue user events until the game state is ready for it. I should say that I'm just now starting to venture outside of the "normal" event loop (by adding my own event handlers, etc.) So, I'm still pretty new at writing code to control events. Any help would be greatly appreciate! Thanks... Robert Purcell www.bapsoft.com __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
