Problem with navigation between lists in grouplist
#1
Hi everyone,

I am currently trying to make a vertical grouplist, consisting of several horizontal panels(poster widgets, like the estuary skin). Now when i navigate between the panel containers, kodi will focus on the last focused item in a container. This results in a weird navigation(because the focus position is not kept from the previous focused container). Previously i have fixed this with the following code in the panel containers:

<onunfocus>SetProperty(ListPosition,$INFO[Container($PARAM[WidgetID]).Position],home)</onunfocus>
<onfocus>Control.Move($PARAM[WidgetID],-$INFO[Container($PARAM[WidgetID]).Position])</onfocus>
<onfocus>Control.Move($PARAM[WidgetID],$INFO[Window(home).Property(ListPosition)])</onfocus>

This usually works fine - the problem is that i currently have an image with a <fadetime> tag, showing an image from the currently focused image. Now when a panel container receives focus, the previously focused item in the container becomes visible for a fraction of a second, before the focus changes to the position of the last focused item in the previous panel container.

Do any of you know a fix for this? Or any ideas of how i can avoid using window properties(i figure this is the reason for the delay). Thanks in advance.

And sorry if this makes no sense - it's difficult to explain in abstract terms Smile
Reply
#2
Yeah I don't think it is possible really as the item is always going to have focus for a brief moment.

SetFocus(id,position) can be used to focus a particular position for an id, but that is going to require a lot of <onup> and <ondown> conditions to get the movement between widgets right and really isn't much of a solution at all.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#3
Delay the animation for a few milliseconds?
Reply
#4
(2017-09-09, 02:37)jurialmunkey Wrote: Yeah I don't think it is possible really as the item is always going to have focus for a brief moment.

SetFocus(id,position) can be used to focus a particular position for an id, but that is going to require a lot of <onup> and <ondown> conditions to get the movement between widgets right and really isn't much of a solution at all.

Yeah i tried with the Set.Focus(id,position), but the grouplist consists of panel containers - So i cant get the setfocus to work. Is this not possible in panel containers?

(2017-09-09, 07:31)Hitcher Wrote: Delay the animation for a few milliseconds?

Is this possible with the <fadetime> tag?

Thanks for your responses Smile
Reply
#5
SetFocus definitely works with panel containers -- even works with multiple rows.
e.g. SetFocus(300,4) will focus the 5th item of container with id 300 (first item is position 0).

Though I'm pretty sure you can't use window properties inside it, so you will need a lot of onup and ondown conditions on every panel container to determine what to focus.


Also, no you can't delay fadetime. I think Hitcher misunderstood and thought you have individual image controls for each container, rather than just one image control with something like $INFO[Container.ListItem.Icon] set as its texture.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#6
Ah i figured out why it did not work. I had to put my widgets inside groups with no id's(making the grouplist unscrollable) - then the ondown / onup events worked. It works fine, but customizability would be a bit difficult to implement with this solution Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Problem with navigation between lists in grouplist0