adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] I'm back !!!


From: Kai Sterker
Subject: Re: [Adonthell-devel] I'm back !!!
Date: Mon, 18 Feb 2002 14:38:32 +0100 (CET)

On 18 Feb 2002 14:34:14 +0100 Alexandre Courbot wrote

>>   and if cur doesn't use the event we iterate the
>> vector while an object doesn't use the event 
> 
> Could it happen that an event needs to be intercepted by two input
> clients? I can't think of a case where it would happen, though.

I think that is exactly the issue with the python console. The label_input
intercepts most keypresses, so you couldn't use ESC or TAB to close it.


That's why I suggested that all objects waiting for input are notified.
If they can be 'disabled', as in Joel's example code, that should work
pretty well.

That also means that keypresses do not remain in the queue as long as
nobody checked for them, which also caused problems. Instead, after each
object has been notified, that particular keypress is dropped, no matter
if an object was interested in it or not.


Besides, Joel's suggestion seems to be more or less what I had in mind as
well. Maybe 'callback' was just not the wrong word for it, as you don't
really attach a method to the input handler, but a complete object.

 
> I like the base idea anyway. Having events decentralised will make them
> easier to handle. But we should also be carefull not to have too much
> data flows - well actually I don't think you can slow down the game by
> just transferring key pushes and mouses moves, so that should be ok.

I think so too. A couple of key-press-events are nothing compared to
blitting roughly 30 Megs of graphic data to the screen every second ;).

Kai





reply via email to

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