glob2-devel
[Top][All Lists]
Advanced

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

key assignments (was: [glob2-devel] GameGUI re-organization)


From: Joe Wells
Subject: key assignments (was: [glob2-devel] GameGUI re-organization)
Date: Tue, 10 Jul 2007 13:58:00 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Leo Wandersleb <address@hidden> writes:

> Stéphane Magnenat wrote:
>> It would also be nice to have all default key assignments stored in
>> an external config file. GameGUIKeyActions could have a load
>> function taking the name of this file as parameter.

By the way, this is already the case for _some_ of the keys.  Commands
bound to alphabetic keys are saved in the main configuration file.

By the way, the arrow keys are treated completely separately from all
other keys.  They are checked every time through the main event loop
if they _happen_ to be pressed at that time.  (Yes, this is bad
because scrolling speed depends on how fast the main event loop is
handled.  Yes, this is bad because pressing and releasing an arrow key
can do _nothing_ if handling the main event loop takes longer than the
key press and release.)

> *agreed* but it's more than nice to have.
> the procedure would be: load default_keys.conf && load
> personal_keys.conf so deleting some/all lines of the latter would lead
> to a clean config while configuration (both default and personalized)
> can be done without compiling in a coherent way.
>
> Questions for me are:
> do we have more than one key per action?
> bind buildSchool1 s
> bind buildSchool1 <shift>s
>
> Representation of that?
> Action | key1 | key2
>
> do we have more than one action per key?
> bind buildSchool1 s
> bind buildSchool2 s
> bind buildSchool3 s
>
> Representation?
>
> do we handle keypressed or also keydown/keyup?
> bind forbiddenBrush +x
> bind previousAction -x

The design here will be limited by what libsdl supports.  (I think it
supports much of what you have in mind.)

It might be nice if the design was not tied to libsdl, to allow the
possibility of future migration.

-- 
Joe




reply via email to

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