adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] GUI question


From: Rian Shelley
Subject: Re: [Adonthell-devel] GUI question
Date: Fri, 15 Oct 2010 14:22:22 -0600

That was my intention when i wrote the code. I specifically designed
it so that you could feed the base object the keystrokes. I never
quite got to wondering what to do with the text fields because i
figured they would be rare in the actual game play.

It would probably be fairly easy to create a new gui object that has a
button for every letter in the alphabet, and then feeding those
characters to whatever child object you want. The only gotcha would be
generating it for an arbitrary charset.

On Fri, Oct 15, 2010 at 1:48 PM, Kai Sterker <address@hidden> wrote:
> I am currently in the process of further cleaning up the GUI code and
> I've reached the first widget that can receive user input.
>
> This raises the question how the GUI should be controlled. The way it
> is implemented now, it's keyboard only and the keys are hardcoded. But
> you might remember that we had introduced the concept of a control
> event, which is a virtual event that can either be triggered by
> keyboard, joystick/gamepad or mouse. (SDL 1.3 also supports
> touchscreens, so we may have to expand to cover those too).
>
> The way the control event is currently implemented, it is limited to 4
> directional and 4 action commands. The question is, should we use that
> for the GUI too? So if somebody used WSAD for movement, it would also
> move the selection in the GUI? And more importantly, if somebody uses
> a gamepad to play, it can also be used to control the GUI! (As an
> aside, did anyone ever try a gamepad with Adonthell v0.4?)
>
> OTOH, using control events for the GUI could lead to ambiguous
> situations. While typing into a textfield, does 'W' type the letter or
> move the selection upwards? So maybe we really do need special code to
> support other methods than keyboard input for the GUI. Gamepad buttons
> could be mapped to keyboard events, but we'd need a virtual keyboard
> for filling in text fields.
>
> Any thoughts on the topic?
>
> Kai
>
> _______________________________________________
> Adonthell-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/adonthell-devel
>



-- 
Rian Shelley
Network Team
Information Technology
Utah State University
(435) 797-2450



reply via email to

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