Kodi Community Forum

Full Version: Problem with default radiobutton
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I have a problem, I want to change color of radiobutton according to the theme color

I have tried this :

Code:
<default type="radiobutton">
        <width>300</width>
        <height>42</height>
        <radiowidth>120</radiowidth>
        <radioheight>76</radioheight>
        <textureradioonfocus>$VAR[Radiobutton]</textureradioonfocus>
        <textureradioonnofocus>$VAR[Radiobutton]</textureradioonnofocus>
        <textureradioofffocus>buttons/radio-button-off.png</textureradioofffocus>
        <textureradiooffnofocus>buttons/radio-button-off.png</textureradiooffnofocus>
        <textureradioondisabled colordiffuse="disabled">$VAR[Radiobutton]</textureradioondisabled>
        <textureradiooffdisabled colordiffuse="disabled">buttons/radio-button-off.png</textureradiooffdisabled>
        <texturefocus border="40" colordiffuse="button_focus">buttons/button-theme-fo.png</texturefocus>
        <texturenofocus border="40">buttons/button-nofo.png</texturenofocus>
        <font>font13</font>
        <textcolor>white</textcolor>
        <disabledcolor>disabled</disabledcolor>
        <textoffsetx>7</textoffsetx>
        <align>left</align>
        <aligny>center</aligny>
        <pulseonselect>no</pulseonselect>
    </default>

And my variable is :

Code:
<variable name="Radiobutton">
        <value condition="String.IsEqual(Skin.CurrentColourTheme,pink)">buttons/radio-button-on-pink.png</value>
        <value condition="String.IsEqual(Skin.CurrentColourTheme,grey)">buttons/radio-button-on-grey.png</value>
        <value condition="String.IsEqual(Skin.CurrentColourTheme,green)">buttons/radio-button-on-green.png</value>
        <value condition="String.IsEqual(Skin.CurrentColourTheme,red)">buttons/radio-button-on-red.png</value>
        <value condition="String.IsEqual(Skin.CurrentColourTheme,orange)">buttons/radio-button-on-orange.png</value>
        <value>buttons/radio-button-on.png</value>
    </variable>

I'm on Krypton and this is return nothing.

Any idea ?
When you say nothing doesn't it even use the default texture?
Yes no texture, not even default texture.
it's not possible to use variables in those tags.

as an alternative, why not create a skin theme for each of your colour themes?
6 skin themes for only radiobutton, it's not famous...
another option may be to use the colordiffuse attribute to create different colour variations of the radiobutton texture?
Not possible with this radiobutton :

Image
I ran into the same issue myself, otherwise i would have completely separated themes from colorthemes. There is no proper solution for this atm.
One option might be to change the radiobutton texture to use grey/white instead of white/button_focus for disabled/enabledcolor.
...I just tested I am fine with it.
So just wait for next skin sync. Wink