<onright>517</onright> works, SetFocus(517) does not.
#1
I have a panel view with a number of items in it. It has four columns and four rows. There is a skin setting to disable/enable a scrollbar. When you reach the fourth column and go right, I want to show the scrollbar if enabled, and go to the first column again (wrap around) if it's not (ultimately, I would like it to go to the first item of the next row, but as far as I can understand that's not possible. Please enlighten me if I'm wrong). If I do it this way:
PHP Code:
<control type="panel" id="517">
    ...
    <
onright>517</onright>
    ...
</
control
it works fine, it goes to the first element. However, I cannot use the condition for the scrollbar on it. Here comes the control group with the onright condition buttons:
PHP Code:
<control type="group" id="610">
    <
description>Onright conditions</description>
    <
posx>-500</posx>
    <
control type="button">
        <
description>Scrollbar disabled</description>
        <
onfocus>SetFocus(517)</onfocus>
        <
visible>!Skin.HasSetting(Launchers_Show_Scrollbar)</visible>
    </
control>
    <
control type="button">
        <
description>Scrollbar enabled</description>
        <
onfocus>SetFocus(61)</onfocus>
        <
visible>Skin.HasSetting(Launchers_Show_Scrollbar)</visible>
    </
control>
</
control
and the <onright> is set to 610, ofc.

This, however does not work. It goes to the buttons fine, and the condition is evaluated, but instead of going to the first column of the row, it stays right where it is, and the zoom animation I have for the focus is executed again, so I assume it does lose focus at some point. If I enable the scrollbar again, it goes to the scrollbar fine.

Bug? Or am I doing something wrong?

Also, as briefly asked above, is there a way to go to the first column on the next row, to get a nice flow going?
Reply
#2
You need to change the <onright></onright> to the scrollbar id and then in the scrollbar controls add -

<visible allowhiddenfocus="true">Control.HasFocus(scrollbar id) + Skin.HasSetting(Launchers_Show_Scrollbar)</visible>

and <onright>517</onright>

It'll only return to the last item that was selected though and not the first column.
Reply
#3
So there's no way to get it to go to the first element without setting it to <onright>517</onright> in the list?

Can I make XBMC forget the last focused item in list 517 perhaps? Because I assume that's what it goes to when focused again, since it focuses the first item upon opening the window.
Reply
#4
That only happens if you restart XBMC though.
Reply
#5
Hitcher Wrote:That only happens if you restart XBMC though.

Well, bummer ..

I suppose I could put the option in the skin settings and use includes instead.

Thanks anyway tho, always with the answers. Smile
Reply

Logout Mark Read Team Forum Stats Members Help
<onright>517</onright> works, SetFocus(517) does not.0