glob2-devel
[Top][All Lists]
Advanced

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

cleaning up key binding (was: [glob2-devel] GameGUI re-organization)


From: Joe Wells
Subject: cleaning up key binding (was: [glob2-devel] GameGUI re-organization)
Date: Thu, 12 Jul 2007 07:15:55 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Bradley Arsenault" <address@hidden> writes:

> I'm almost done the new system, having expanded it somewhat to have a KeyPress
> class, which represents a single key press event (in or out and if control/
> shift/alt being held) and a KeyboardShortcut class, which can be any sequence
> of KeyPresses that ends up with a particular action. I've also vastly improved
> the Settings screen that makes editing shortcuts allot more logical.
>
> I have one issue though. How should I handle the default keyboard shortcuts? 
> My
> current semantics just load the defaults when no customizations are present,
> but what happens if we add new keyboard shortcuts in the future? The user will
> be un-informed. Its not really a big issue, but if i where a user and the "a"
> key did something new, but nothing happenned, it might seem like a bug.

Can you clarify your question?  I don't understand what you are asking.

> And by the way, layout files look like this (these are only a few of the
> shortcuts), if your interested:
>
> <tab>=iterate selection
> <return>=open chat box
> <pause>=pause game
> <escape>=show main menu
> <space>=go to event
> <+>=increase units working
> <->=decrease units working
> <=>=increase units working
> <d>=destroy building
> <a>-<a>=switch to adding areas
> <a>-<c>=select place clearing area
> <a>-<d>=switch to removing areas
> <a>-<f>=select place forbidden area
> <a>-<g>=select place guard area
> <b>-<a>=select construct swarm
> <b>-<b>=select construct barracks

Looks nice!

If only “a” has been pressed, does the user get any feedback so they
know that glob2 is waiting for the 2nd keypress of a 2-key sequence?

If the user presses “a” followed by “tab”, what happens?  (Hopefully,
nothing except that the user gets some feedback indicating the two key
events were discarded.)

> I'm wondering where I should head next in terms of re-organizing GameGUI.

Did you fix bug 19602
(<URL:http://savannah.nongnu.org/bugs/index.php?19602> “using “+” to
adjust requested workers fails on many keyboards”) the correct way
(i.e., calling SDL_EnableUNICODE and then using the “unicode” field of
the key event)?

-- 
Joe

> Perhaps I will re-organize selections, as I noticed an enum in there ....




reply via email to

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