Kodi Community Forum

Full Version: Shutdown Menu Icon/Positioning
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In my shutdown menu I'm trying to display an icon that changes depending on which item is selected (e.g. exit, shutdown, sleep, etc), however I can't get it to work.

I've defined the icon whilst defining each item in the list, e.g...
Quote:<item>
     <label>$LOCALIZE[13016]</label>
     <icon>defaultactor.png</icon>
     <onclick>Powerdown()</onclick>
     <visible>System.CanPowerDown</visible>
</item>
...and then tried to call it using...
Quote:<control type="image">
     <right>800</right>
     <centertop>50%</centertop>
     <width>380</width>
     <height>380</height>
     <aspectratio aligny="center">keep</aspectratio>
     <fadetime>250</fadetime>
     <texture colordiffuse="FF4A4F51">$INFO[ListItem.Icon]</texture>
</control> 
but this doesn't work?! I've also tried $INFO[ListItem(9000).Icon].

As well as this I want the list to move depending on the number of items (so it is always central), for which I've tried...
Quote:<animation effect="slide" start="0,0" end="0,120" time="0" condition="Integer.IsEqual(Container.NumItems,7)">Conditional</animation>
..again this doesn't work.

Is there something I'm missing? This kind of thing works in other windows and I thought it would be simple enough here.

Thanks in advance.
try if it works if you specify the container id:
$INFO[Container(9000).ListItem.Icon]
Integer.IsEqual(Container(9000).NumItems,7)
(2018-03-01, 21:49)Eddage Wrote: [ -> ]... I've also tried $INFO[ListItem(9000).Icon]

Your syntax is wrong. As ronie pointed out, it should be:
Code:
$INFO[Container(9000).ListItem.Icon]
Goddammit!

Thanks guys, I was literally copying code from my context menu as well where I've used the correct syntax!  Blush