paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [paragui-users] Buttons capture all events when pressed...


From: Ulf Lorenz
Subject: Re: [paragui-users] Buttons capture all events when pressed...
Date: Tue, 9 Dec 2003 02:41:36 +0100
User-agent: Mutt/1.5.4i

On Mon, Dec 08, 2003 at 04:50:44PM +0100, Steve McCrea wrote:
> MessageHi,
> 
> We're developing a timed game, but if I hold down one of the buttons the game
> pauses, because the button's eventMouseButtonDown() calls SetCapture(), so
> that all events are sent to this button only.
> 
> I commented out this part of PG_MessageObject::ProcessEvent() so that
> messages would continue to go to all objects:
> 
>     if ((captureObject != NULL) && (captureObject != this)) {
>         return false;
>     }
> 
> and it seems to do what I want (not pause the game), but can anyone advise me?
> Is this a good idea?
> Is there a better way?
Do you use PG_TimerObject for your timing? As far as I could see from
the code, it bypasses the event queue in favor of a direct callback, so
I am a bit surprised that it doesn't work.

Second surprise on a short glance is that uncommenting the code part
helps. Does the timer function send user events? Because all other
events are sent to the capture object only in
PG_MessageObject::PumpIntoEventQueue().

If the timer function does send user messages, then uncommenting this
will indeed help. Since this if-clause is redundant and blocks
processing, it should even be deleted.

> Thanks,
> Steve
Ulf

-- 
Good old Dame Fortune. You can _depend_ on her. 
(The Truth)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]