(2022-02-13, 13:49)garbear Wrote: I honestly forgot to consider skin navigation. I wrote code in core to focus the inner list. It's hard because item layouts operate differently than the rest of the skin. When the window is loaded the entire skin is read into memory, but itemlayouts only initialize a "template". Then, dynamically, the lists are populated, and each inner list item is initialized from the "template" item layout. The problem is that a control ID can't be assigned, because cloning the template would duplicate the ID.
There is a workaround, however. Kodi will pass the index of the inner listitem using the ListItem.CurrentItem label. CurrentItem starts at 1 and counts up for each listitem of the inner list. Maybe there's some concatenation trickery we can do to make use of this.
(2022-01-30, 14:30)mardukL Wrote: Video - on right just loose focus of id 50, but gain no new focus on control 5001 https://streamable.com/pnal3w
Can you skin up how lists within lists *should* work, and then send me the skin code? I can modify core so that the navigation performs like you expect.
Hi, thanks for taking a look.
So for Navigation, i would just stick witch the simple onright navigations, as 'sublist' is stick to a 1 row, or 1 column layout of the root container.
e.g.
means if list 50 is vertical list, filled with dynamic content
50 = root list
<onright>SetFocus(50001)</
50001 = sub list of 50
<onleft>50</onleft> <!-- should be able focus ROOT LIST -->
<onup>Control.Move(50,-1)</onup> <!--dynamic content container, should move root up ,but keep focus the sublist, ~ circular navigaition-->
<ondown>Control.Move(50,1)</ondown> <!-- dynamic content container, should move root down , but keep focus the sublist, ~ circular navigaition--->
....
Currently i just struggle define 'working' visible conditions.
Not pretty importantat ( least to me ) but depending on a usecase it effeccts other situations as well.
in my test case
Integer.IsLess(ListItem.CurrentItem, Container.CurrentItem) ALWAYS FALSE, but should be true for the 1st colum : listitem(-1).**
Integer.IsGreater(ListItem.CurrentItem, Container.CurrentItem) RETURN ALWAYS TRUE but should be true for the 3st colum : listitem(1).**
watch gallery
I created a view type in estuary for testing...
code used :
https://github.com/marduklev/xbmc/commit...5f465e4b01
xml:
<?xml version="1.0" encoding="UTF-8"?>
<includes>
<include name="View_510_SubLists">
<param name="bottom_offset">list_bottom_offset</param>
<definition>
<control type="group">
<include>OpenClose_Right</include>
<visible>Control.IsVisible(510)</visible>
<include>Visible_Right</include>
<control type="fixedlist" id="510">
<description>ROOT - Equals main media item which can lead to 'subdir' : tvshows,sets,artists...</description>
<visible>Container.Content(tvshows) | Container.Content(sets) | Container.Content(artists) | Container.Content(albums) | Container.Content(tvshows) | Container.Content(games)</visible>
<left>50</left>
<top>100</top>
<bottom>$PARAM[bottom_offset]</bottom>
<right>0</right>
<scrolltime tween="cubic" easing="out">500</scrolltime>
<orientation>vertical</orientation>
<pagecontrol>531</pagecontrol>
<focusposition>1</focusposition>
<onleft>9000</onleft>
<onright>51001</onright> <!-- should be able focus SUB LIST -->
<onup>510</onup>
<ondown>510</ondown>
<viewtype label="View 510 SubLists">list</viewtype>
<focusedlayout height="300">
<control type="group">
<width>sublists_rootlayout_width_hor</width>
<include content="sublist_root_layout" />
</control>
<control type="group">
<left>sublists_rootlayout_width_hor</left>
<centertop>50%</centertop>
<control type="image">
<animation effect="fade" end="50" condition="true">conditional</animation>
<bordersize>2</bordersize>
<texture>colors/black.png</texture>
</control>
<control type="list" id="51001">
<orientation>horizontal</orientation>
<onleft>510</onleft> <!-- should be able focus ROOT LIST -->
<onup>Control.Move(510,-1)</onup> <!-- should move root up -->
<ondown>Control.Move(510,1)</ondown> <!-- should move root down -->
<focusedlayout height="150" width="100" condition="Container.Content(tvshows)">
<control type="group">
<width>sublists_rootlayout_width_hor</width>
<include content="sublist_sub_layout" />
</control>
</focusedlayout>
<itemlayout height="150" width="100" condition="Container.Content(tvshows)">
<control type="group">
<width>sublists_rootlayout_width_hor</width>
<include content="sublist_sub_layout">
<param name="focusborder" value="" />
</include>
</control>
</itemlayout>
<content limit="5">$INFO[Container(510).ListItem(0).FolderPath]</content>
<!-- tvshows lib path <content>videodb://tvshows/titles/$INFO[ListItem.dbid]/</content> -->
<!-- tvshows xsp lib path <content>videodb://tvshows/titles/? xsp=%7B%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22contains%22%2C%22value%22%3A%5B%22$INFO[ListItem.TVShowTitle]%22%5D%7D%5D%7D%2C%22type%22%3A%22tvshows%22%7D</content> -->
</control>
</control>
</focusedlayout>
<itemlayout height="300">
<control type="group">
<width>sublists_rootlayout_width_hor</width>
<include content="sublist_root_layout">
<param name="focusborder" value="" />
</include>
</control>
<control type="group">
<description>may found a bug, but used as visible condition</description>
<left>1300</left> <!-- use left , just for debugging purpose - better diff lists condition -->
<!-- should be default <left>sublists_rootlayout_width_hor</left> -->
<!-- <visible> Integer.IsEqual(ListItem.CurrentItem, Container.CurrentItem)</visible> I ALWAYS FALSE : got my issues by check against to differenciate -->
<centertop>50%</centertop>
<control type="image">
<animation effect="fade" end="50" condition="true">conditional</animation>
<bordersize>2</bordersize>
<texture>colors/black.png</texture>
</control>
<control type="list">
<orientation>horizontal</orientation>
<focusedlayout height="150" width="100" condition="Container.Content(tvshows)">
<control type="group">
<width>sublists_rootlayout_width_hor</width>
<include content="sublist_sub_layout" />
</control>
</focusedlayout>
<itemlayout height="150" width="100" condition="Container.Content(tvshows)">
<control type="group">
<width>sublists_rootlayout_width_hor</width>
<include content="sublist_sub_layout">
<param name="focusborder" value="" />
</include>
</control>
</itemlayout>
<content limit="5">$INFO[ListItem(-1).folderpath]</content>
<!-- tvshows lib path <content>videodb://tvshows/titles/$INFO[ListItem(-1).dbid]/</content> -->
<!-- tvshows xsp lib path <content>videodb://tvshows/titles/? xsp=%7B%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22contains%22%2C%22value%22%3A%5B%22$INFO[(-1)ListItem.TVShowTitle]%22%5D%7D%5D%7D%2C%22type%22%3A%22tvshows%22%7D</content> -->
</control>
</control>
<control type="group">
<description>may found a bug, visible condition</description>
<left>sublists_rootlayout_width_hor</left>
<!-- <visible>Integer.IsGreater(ListItem.CurrentItem, Container.CurrentItem)</visible> I RETURN ALWAYS TRUE -->
<centertop>50%</centertop>
<control type="image">
<animation effect="fade" end="20" condition="true">conditional</animation>
<bordersize>2</bordersize>
<texture>colors/black.png</texture>
</control>
<control type="list">
<orientation>horizontal</orientation>
<focusedlayout height="150" width="100" condition="Container.Content(tvshows)">
<control type="group">
<width>sublists_rootlayout_width_hor</width>
<include content="sublist_sub_layout" />
</control>
</focusedlayout>
<itemlayout height="150" width="100" condition="Container.Content(tvshows)">
<control type="group">
<width>sublists_rootlayout_width_hor</width>
<include content="sublist_sub_layout">
<param name="focusborder" value="" />
</include>
</control>
</itemlayout>
<content limit="5">$INFO[ListItem(1).folderpath]</content>
<!-- tvshows lib path <content>videodb://tvshows/titles/$INFO[ListItem(1).dbid]/</content> -->
<!-- tvshows xsp lib path <content>videodb://tvshows/titles/? xsp=%7B%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22contains%22%2C%22value%22%3A%5B%22$INFO[(1)ListItem.TVShowTitle]%22%5D%7D%5D%7D%2C%22type%22%3A%22tvshows%22%7D</content> -->
</control>
</control>
</itemlayout>
</control>
</control>
</definition>
</include>
<include name="sublist_sub_layout">
<control type="image">
<centertop>50%</centertop>
<left>10</left>
<height>92%</height>
<bordersize>3</bordersize>
<bordertexture>$PARAM[focusborder]</bordertexture>
<texture>$INFO[ListItem.Art(poster)]</texture>
<aspectratio align="left" aligny="center">keep</aspectratio>
</control>
</include>
<include name="sublist_root_layout">
<param name="focusborder" default="colors/white.png" />
<definition>
<control type="image">
<bordersize>2</bordersize>
<texture colordiffuse="cc000000">$PARAM[focusborder]</texture>
</control>
<control type="image">
<centertop>50%</centertop>
<left>10</left>
<height>92%</height>
<bordersize>3</bordersize>
<bordertexture>$PARAM[focusborder]</bordertexture>
<texture>$INFO[ListItem.Art(poster)]</texture>
<aspectratio align="left" aligny="center">keep</aspectratio>
</control>
<control type="image">
<left>145</left>
<top>10</top>
<width>32</width>
<height>32</height>
<bordersize>3</bordersize>
<bordertexture colordiffuse="black" border="2">buttons/roundbutton-fo.png</bordertexture>
<texture>$VAR[ListWatchedIconVar]</texture>
</control>
<control type="label">
<font>font_flag</font>
<align>left</align>
<top>10</top>
<left>220</left>
<width>2000</width>
<height>90%</height>
<aligny>center</aligny>
<scroll>true</scroll>
<label>ListItem.CurrentItem :$INFO[ListItem(-1).CurrentItem][CR][CR]Container.CurrentItem : $INFO[Container.CurrentItem] [CR]$INFO[ListItem.dbid,dbid: ,][CR]$INFO[ListItem.folderpath,folderpath: ,][CR][CR]$VAR[ListLabelVar]</label>
<!-- default <label>$VAR[ListLabelVar]</label> -->
<shadowcolor>text_shadow</shadowcolor>
</control>
<control type="label">
<visible>false</visible>
<align>left</align>
<top>55</top>
<left>230</left>
<align>right</align>
<aligny>center</aligny>
<label>$VAR[ListLabel2Var]</label>
<shadowcolor>text_shadow</shadowcolor>
</control>
</definition>
</include>
<constant name="sublists_rootlayout_width_hor">600</constant>
</includes>
EDIT:
alos nothing relevant in the log, just wondered about
WARNING <general>: Trying to add unsupported control type 29
when i open
MyVideoNav.xml