Kodi Community Forum

Full Version: Mainmenu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'd like to customize each button with a colored stripe. So "Settings" should have a yellow stripe on top, "Music" should have a red stripe.
I tried this by setting up a variable that should change the value (path to images with different colors) with an hasfocus-condition. But all Buttons use the same color. If I hover over the buttons the color changes of all the buttons. That's weird.
Those for buttons should have a stripe in red,blue,yellow and green color. But my code messes up. Please help me out?

Here some screenshotsImageImageImage


<variable name="MainMenu_Button_stripe">
        <value condition="Container(9000).Hasfocus(1)">special://skin/extras/stripe/red.png</value>
        <value condition="Container(9000).Hasfocus(2)">special://skin/extras/stripe/blue.png</value>
        <value condition="Container(9000).Hasfocus(3)">special://skin/extras/stripe/yellow.png</value>
        <value condition="Container(9000).Hasfocus(4)">special://skin/extras/stripe/green.png</value>

for the buttons that are in an itemlayout/focusedlayout:  

 <control type="image"> <!-- oberer Streifen -->
not sure if this skin uses standard menu buttion

       <property name="menu_id">$NUMBER[20000]</property>
       <property name="id">internet</property>
<thumb>  may need a transparent image with stripe at the top

<value condition="Container(9000).Hasfocus(1)"> this may need to be movies
the menu is linked by
or the id number  <property name="menu_id">$NUMBER[5000]</property> <control type="group" id="5000">
I use the eminence skin and modified it.
I was also thinking about the possibility to use the thumb property. But I don't know where to change that. There is no entry in the skin files, so I guess it uses the standard-item configuration for the main menu. The main menu auf the skin uses <itemlayout> and <focusedlayout> to arrange the items: Image+Label+Icon. How could I insert the thumb? And where can I edit the information for <thumb> for each item?

<itemlayout width="206" height="266" condition="!String.IsEqual(Skin.String(home.style),$LOCALIZE[31181]) + !String.IsEqual(Skin.String(home.style),$LOCALIZE[31182])">
                    <control type="image">
                        <texture colordiffuse="HomeBarTile">common/tile3.png</texture>
                        <visible>String.IsEmpty(ListItem.Property(tilecolor)) | !Skin.HasSetting(home.tilecolor.nofocus) | !Skin.HasSetting(home.tilecolor)</visible>
                   <control type="image">
                        <aspectratio scalediffuse="false">center</aspectratio>
                        <animation effect="fade" start="50" end="50" condition="true">Conditional</animation>
                    <control type="label">
                        <animation effect="fade" start="50" end="50" condition="true">Conditional</animation>
Well I found the entries for <thumb></thumb>. But changes to that also affected the icons of my buttons, so I finally used the property <label2> to point to my color stripe. This worked. It's a dirty solution. I also tried to introduce a new property <property name="stripe">red.png</property> and called it with ListItem.Property(stripe). But didn't work.