Kodi Community Forum
Problem with directional controls and skipping - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Problem with directional controls and skipping (/showthread.php?tid=112767)



Problem with directional controls and skipping - Hitcher - 2011-10-19

I've got a problem with the TV Next layout I'm making for XeeBo when there's no info available for one of the days in the group and it's the one that has an ActivateWindow() control associated with it.

In the setup below list 202 has the <onleft>ActivateWindow(51)</onleft> control which works fine.
205 has <onright>206</onright> but because 206 isn't focusable XBMC then uses it's onright control which is <onright>200</onright> - again this works fine.

Image

The problem occurs when the non-focusable list is the one with <onleft>ActivateWindow(51)</onleft> control. In this case clicking left from list 200 which has <onleft>206</onleft> XBMC wont then use 206's onleft control and open window 51. Instead it just doesn't move.

Image

Thanks.


- `Black - 2011-10-19

The id's are not correct, monday is always 200, tuesday 201 etc... maybe that's the problem?


- Hitcher - 2011-10-19

Sorry, should have mentioned that the labels aren't yet coded to behave the same way as the lists so ignore what they say.

The problem is XBMC doesn't or wont use the skipped item's controls if they're anything other than another controls ID.


- `Black - 2011-10-19

Ok that could indeed be a bug. Smile


- pieh - 2011-10-20

Hitcher, do You have sample code to reproduce this problem?

---edit
oh, just realised what this is about - don't need samples - I can prepare them myslef now that I understand issue


- Hitcher - 2011-10-20

In case you still some sample code use the following for the last button in Confluence's VideoOSD.xml.

PHP Code:
            <control type="button" id="705">
                <
posx>180</posx>
                <
posy>0</posy>
                <
width>45</width>
                <
height>45</height>
                <
label>31355</label>
                <
font>-</font>
                <
texturefocus>OSDDvdFO.png</texturefocus>
                <
texturenofocus>OSDDvdNF.png</texturenofocus>
                <
onleft>704</onleft>
                <
onright>ActivateWindow(videos)</onright>
                <
onup>1000</onup>
                <
ondown>1000</ondown>
                <
onclick>PlayerControl(ShowVideoMenu)</onclick>
                <
animation effect="fade" start="100" end="50" time="100" condition="!VideoPlayer.HasMenu">Conditional</animation>
            </
control

You'll see that when you press right on the DVD menu button it will open up the Videos window but if you add back in the <enable> control (code code below) you'll get to the Bookmarks button and it wont let you skip and open Videos.

PHP Code:
            <control type="button" id="705">
                <
posx>180</posx>
                <
posy>0</posy>
                <
width>45</width>
                <
height>45</height>
                <
label>31355</label>
                <
font>-</font>
                <
texturefocus>OSDDvdFO.png</texturefocus>
                <
texturenofocus>OSDDvdNF.png</texturenofocus>
                <
onleft>704</onleft>
                <
onright>ActivateWindow(videos)</onright>
                <
onup>1000</onup>
                <
ondown>1000</ondown>
                <
onclick>PlayerControl(ShowVideoMenu)</onclick>
                <
enable>VideoPlayer.HasMenu</enable>
                <
animation effect="fade" start="100" end="50" time="100" condition="!VideoPlayer.HasMenu">Conditional</animation>
            </
control

Thanks.

EDIT: I also tried using a grouplist and adding <onleft>ActivateWindow(51)</onleft> control to that but that wont open the window at all.


- Hitcher - 2011-10-23

@pieh

Did you have a chance to see if this is fixable or not?

Thanks.


- pieh - 2011-10-23

this is fixable, sure - I checked where the problem is but I don't think I will have time to come with acceptable solution earlier than next weekend


- Hitcher - 2011-10-23

That's cool, no rush. I just wanted to know so I can carry on with my intended layout and not scrap it all together.

Thanks.


- pieh - 2011-11-01

Hitcher Wrote:That's cool, no rush. I just wanted to know so I can carry on with my intended layout and not scrap it all together.

Thanks.
Few days late ... but still 518 (PR).

Also while I was messing with code - there seems to be workaround for this (in case our current behaviour will be considered as desired):
Instead of having <onleft>ActivateWindow(51)</onleft> in first column - make it go to button that will focus first focusable column from left and activate that window:
Code:
<onfocus condition="Control.IsVisible(200)">SetFocus(200)</onfocus>
up to
<onfocus condition="Control.IsVisible(206)">SetFocus(206)</onfocus>

and of course

<onfocus>ActivateWindow(51)</onfocus>

(I bet You had it figured out already, but thought I'll write it down just in case)