adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] [BUG] Pressing right or left arrow breaks a conver


From: Kai Sterker
Subject: Re: [Adonthell-devel] [BUG] Pressing right or left arrow breaks a conversation
Date: Mon, 2 Jul 2012 23:36:08 +0200

On Mon, Jul 2, 2012 at 5:22 PM, Josh Glover <address@hidden> wrote:

> For me, that deselects the current answer, and no amount of pressing
> up or down reselects it.
>
> Can anyone reproduce?

Yes. Good catch!


> In the gui::conversation key input handler, it looks like all
> unrecognised keys are passed through. I guess this is what we want
> normally, but perhaps we should filter out the right and left arrow?
>
> https://github.com/ksterker/adonthell/blob/9dc3077ec03ccae4ae4ccd9e4b1cec2ebc24b4d3/src/gui/conversation.cc#L152
>
> Any ideas for the best way to fix this?

I would say this is a problem with gui::layout itself, not just
gui::conversation. If you look at the implementation, you'll see that
conversation is a scrollview is as layout. The scrollviews only child
is a list_layout that in turn contains all the answers. As long as
everything is fine, focus is with the first answer and up/down moves
it to the previous/next. But when pressing left/right, something odd
happens with the focus. Given the involved widgets, I would have
assumed that nothing but the answers can end up with the focus anyway
(layouts should always pass the focus down to a child that isn't a
layout). And the hierarchy we have is basically

  scrollview
     list_layout
         button 1
         button 2
         ...
         button n

So we need to figure out where the focus goes and make sure that it
stays where it is instead. gui::conversation should not have to change
for that.

Kai



reply via email to

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