Quantcast
Channel: Kodi Community Forum - Skinning
Viewing all articles
Browse latest Browse all 1803

Grouplist Navigation

$
0
0
Hello all,

This is probably a basic question, but I have not been able to figure this out.  I have a vertical grouplist in my video info dialog, with (at the moment) two panels, one for cast and one for seasons (if it is a tv show).  I want the seasons panel to show if there is no cast, and if there is cast and seasons obviously both to show, first cast and when you press down, seasons.  My problem right now is that when there is no cast, I don't see the seasons panel (it is there, it just is not being shown on screen).  However, if I add a visibility condition to the cast panel to show when numitems > 0 or the container isupdating, then the cast does not show when there are both cast and seasons, and the numitems is always 0.

Here is an excerpt of what I have in dialogvideoinfo.xml:


<control type="grouplist" id="91001">
                <posx>700</posx>
                <posy>622</posy>
                <width>1180</width>
                <height>450</height>
                <orientation>vertical</orientation>
                <itemgap>10</itemgap>
                <usecontrolcoords>true</usecontrolcoords>
                <onup>9000</onup>
                <scrolltime tween="quadratic">400</scrolltime>
                <include condition="!String.IsEqual(ListItem.DBTYPE,set) + !String.IsEmpty(ListItem.DBID) + String.IsEmpty(ListItem.Property(tmdb_id))">DefaultCast</include>
                <include condition="String.IsEqual(ListItem.DBTYPE,tvshow) + Integer.IsGreater(ListItem.Property(TotalSeasons),0)">SeasonPanel</include>
            </control>

And this I have in an includes_info.xml:


    <!-- Default Cast panel item: container 50 -->
    <include name="DefaultCastItem">
        <param name="CastListItemID" />
        <definition>
            <item>
                <label>$INFO[Container(50).ListItemAbsolute($PARAM[CastListItemID]).Label]</label>
                <label2>$INFO[Container(50).ListItemAbsolute($PARAM[CastListItemID]).Label2]</label2>
                <icon>$INFO[Container(50).ListItemAbsolute($PARAM[CastListItemID]).Icon]</icon>
                <visible>!String.IsEmpty(Container(50).ListItemAbsolute($PARAM[CastListItemID]).Label)</visible>
            </item>        
        </definition>
    </include>
    <!-- Default Cast panel items -->
    <include name="DefaultCastListContent">
        <include content="DefaultCastItem">
            <param name="CastListItemID">0</param>
        </include>
        <include content="DefaultCastItem">
            <param name="CastListItemID">1</param>
        </include>
        <include content="DefaultCastItem">
            <param name="CastListItemID">2</param>
        </include>
        <include content="DefaultCastItem">
            <param name="CastListItemID">3</param>
        </include>
        <include content="DefaultCastItem">
            <param name="CastListItemID">4</param>
        </include>
        <include content="DefaultCastItem">
            <param name="CastListItemID">5</param>
        </include>
    </include>
    <!-- Cast Panel: Always use a Custom cast panel to have control over actions -->
    <include name="DefaultCast">
        <control type="panel" id="90050">
            <top>44</top>
            <left>10</left>
            <width>1180</width>
            <height>410</height>
            <onup>9000</onup>
            <onback>9000</onback>
            <preloaditems>2</preloaditems>
            <scrolltime tween="quadratic" easing="out">300</scrolltime>
            <orientation>horizontal</orientation>
            <!-- select online tmdb search or local search -->
            <onclick>SetProperty(Dialog.1.Label,$LOCALIZE[32018])</onclick>
            <onclick>SetProperty(Dialog.1.BuiltIn,RunScript(plugin.video.themoviedb.helper,add_query=$INFO[Container(90050).ListItem.Label],type=person,call_id=1129,prevent_del))</onclick>
            <onclick>SetProperty(Dialog.2.Label,$LOCALIZE[32017])</onclick>
            <onclick>SetProperty(Dialog.2.BuiltIn,Skin.SetString(CustomSearchTerm,$ESCINFO[Container(90050).ListItem.Label])||Dialog.Close(all)||ActivateWindow(1122))</onclick>
            <onclick>RunScript(script.embuary.helper,action=createselect,header=$LOCALIZE[137])</onclick>
            <include content="ActorLayout">
                <param name="viewid">90050</param>
            </include>
            <content>
                <include>DefaultCastListContent</include>
            </content>
        </control>
    </include>
    <!-- Season Panel -->
    <include name="SeasonPanel">
        <control type="panel" id="910012">
            <top>44</top>
            <left>10</left>
            <width>1180</width>
            <height>410</height>
            <preloaditems>2</preloaditems>
            <scrolltime tween="quadratic" easing="out">300</scrolltime>
            <orientation>horizontal</orientation>
            <include>InfoList_OnBack</include>
            <include content="InfoList_OnClickSeasons">
                <param name="prevent_del">prevent_del</param>
            </include>
            <include content="CastLayout">
                <param name="viewid">910012</param>
                <param name="belowdoublelabel1">$INFO[ListItem.Label] $INFO[ListItem.Year,(,)]</param>
                <param name="belowdoublelabel2"></param>
                <param name="belowdoublelabelvisibility">false</param>
                <param name="belowlabelvisibility">true</param>
                <param name="belowlabel">$INFO[ListItem.Label]</param>
                <param name="belowlabelheight">74</param>
            </include>
            <content sortby="name" sortorder="ascending" limit="25" target="videos">$INFO[ListItem.DBID,videodb://tvshows/titles/,/]</content>                        
        </control>
    </include>

I would really appreciate any help any of you can provide.  It seems to me there are some fundamental things about grouplist navigation and control visibility that are escaping me, and while I have worked around the issues with having onup and ondown tags in the panels to move around in the grouplist (current code in Amber, the above is development code), I really want to understand the way to do this correctly so that I do not have to use workarounds and the grouplist works with 1 panel or 20 panels in it, irrespective of whether any panel in the grouplist is visible or not).

Regards,

Bart

Viewing all articles
Browse latest Browse all 1803

Trending Articles