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

$PARAM indirection

$
0
0
Hi guys,

I've decided to up my game with my skin and so I have made the jump to using $PARAM includes. It has worked reasonably well up to this point but I have now hit a road block I am having trouble getting my head around, could someone please point out where I am going wrong.

I have the following include definition which is working fine when I pass an $INFO directly to it, but not when I try to pass via a listitem property.
PHP Code:
    <include name="listitem-count">
        <
param name="left" default="0"/>
        <
param name="top" default="0"/>
        <
param name="count"/>
        <
param name="size" default="100"/>
        <
definition>
            <
control type="group">
                <
visible>IntegerGreaterThan($PARAM[count],0)</visible>
                <
animation condition="true" effect="zoom" start="100" end="$PARAM[size]center="auto" time="0">Conditional</animation>
                <
left>$PARAM[left]</left>
                <
top>$PARAM[top]</top>
                <
control type="group">
                    <
descriptionCount (less than 10) </description>
                    <
visible>!IntegerGreaterThan($PARAM[count],9)</visible>
                    <
control type="image">
                        <
left>12</left>
                        <
top>0</top>
                        <
width>32</width>
                        <
height>32</height>
                        <
texture>overlaynumberitems.png</texture>
                    </
control>
                    <
control type="label">
                        <
left>22</left>
                        <
top>4</top>
                        <
width>12</width>
                        <
height>20</height>
                        <
font>font10</font>
                        <
label>$INFO[$PARAM[count]]</label>
                        <
shadowcolor></shadowcolor>
                        <
align>center</align>
                    </
control>
                </
control>

...

            </
control>
        </
definition>
    </include> 

I call it in a number of my views like this and it works fine
PHP Code:
                <include name="listitem-count">
                    <
param name="left" value="170"/>
                    <
param name="top" value="428"/>
                    <
param name="count" value="ListItem.Property(UnwatchedEpisodes)" />
                    <
param name="size" value="90"/>
                </include> 

But when I use the following in a panel container (id=9000)
PHP Code:
                <include name="listitem-count">
                    <
param name="left" value="0"/>
                    <
param name="top" value="138"/>
                    <
param name="count" value="$INFO[Container(9000).Listitem.Property(itemcount)]/>
                    <
param name="size" value="90"/>
                </include> 

and the item for the panel is defined thus, I see nothing (in other words the param is not set correctly)
PHP Code:
                <item><!-- Movies -->
                    <
visible>!Skin.HasSetting(home-movie)</visible>
                    <
thumb>special://skin/extras/homeicons/movie.png</thumb>
                    
<label>$LOCALIZE[31026]</label>
                    <
label2>$LOCALIZE[31026]</label2>
                    <
onclick>$VAR[MovieLibEntry]</onclick>
                    <
property name="itemcount">Window(Home).Property(Movies.UnWatched)</property>
                </
item

I have tried using a $VAR and changing the param and property but currently have had no success, can someone please suggest the correct way to achieve what I'm after?

Wyrm

Viewing all articles
Browse latest Browse all 1803

Trending Articles