[Top][All Lists]

[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 15:19:33 +0100 (CET)

On 18 Feb 2002 15:04:07 +0100 Alexandre Courbot wrote
>> You mean a bit like the current system, where the keypresses are sorta
>> queued, and whoever is interested in keyboard input would look at the
>> queue and pick out what is there?
> The keypresses weren't queued in the current system - only the latest
> state of the key was stored. With that, EVEN a queue system would be an
> improvment ;)

Okay, now that I see clearer, on to some queue-bashing ;)

Like I said in the other mail, if you simply queue key presses, there will
be problems if nobody consumes them. As soon as you open a window that
wants some text input, it'll get everything in the queue. Even with the
primitive system we have now,the savegame GUI had to call
    input::clear_keys_queue ();
as otherwise unwanted text showed up in the save game description.

That wouldn't be an issue with a callback or signal system, as there
wouldn't be any old keypresses queued.

I think the signal system is in so far superior to the simple callbacks,
as the classes that want to recieve input need not extend some keyListener

And seeing Kenneth's code snippets, I think it can't be done much cleaner.
(I'll get to the SDL/OpenGL issue soon, btw ...)


reply via email to

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