Kodi Community Forum

Full Version: Texture Variable [DialogButtonMenu]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For some reason my buttons come up with a blank background if I use a variable in the texture tag.
When using it in the label tag it works just fine though. So it cannot be a general resolving problem.
There must be something about the texture tag, buttons or DialogButtonMenu.xml that prevents variables from working correctly.
Sure I could duplicate all controls and use the visibility tag to achieve what I want, but I'd prefer to keep the code clean if that's possible.
Your code would be helpful in order to diagnose.
Here's my code. I've added comments to the relevant lines.

<variable name="ButtonMenuBg">
    <value condition="Window.IsVisible(FullscreenVideo) | Window.IsVisible(Visualisation)">buttons/button-menu-mid-dark.png</value>

    <control type="grouplist" id="9000">
        <control type="group">
            <control type="button" id="2">
                <description>Shutdown button</description>
                <texturefocus border="12,0,12,0">$VAR[ButtonMenuBg]</texturefocus> <!-- BROKEN-->
                <texturenofocus border="12,0,12,0">$VAR[ButtonMenuBg]</texturenofocus> <!-- BROKEN-->
                <label>$VAR[ButtonMenuBg]</label> <!-- WORKING -->
            <control type="image">
                <texture>$VAR[IconShutdown]</texture> <!-- WORKING -->
Worked around this using conditional includes.
I experience exactly the same phenomena with the latest Gotham build. Using the conditional includes works but is not really intuitive.

Is this scheduled to be fixed in a future gotham build?
It's possibly due to the fact that those buttons are duplicated for the other buttons in the buttonmenu ?

Seems odd that it wouldn't copy across as-is though.