Texture Variable [DialogButtonMenu]
#1
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.
Image
Reply
#2
Your code would be helpful in order to diagnose.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Here's my code. I've added comments to the relevant lines.

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

DialogButtonMenu.xml
Code:
<controls>
    <control type="grouplist" id="9000">
        [...]
        <control type="group">
            <posx>0</posx>
            <posy>0</posy>
            <width>340</width>
            <height>57</height>
            <control type="button" id="2">
                <description>Shutdown button</description>
                <posx>0</posx>
                <posy>0</posy>
                <width>340</width>
                <height>57</height>
                <textoffsetx>55</textoffsetx>
                <textcolor>beige</textcolor>
                <focusedcolor>blue</focusedcolor>
                <shadowcolor>white</shadowcolor>
                <align>left</align>
                <textwidth>270</textwidth>
                <texturefocus border="12,0,12,0">$VAR[ButtonMenuBg]</texturefocus> <!-- BROKEN-->
                <texturenofocus border="12,0,12,0">$VAR[ButtonMenuBg]</texturenofocus> <!-- BROKEN-->
                <onclick>XBMC.Powerdown()</onclick>
                <onup>10</onup>
                <ondown>3</ondown>
                <onleft>-</onleft>
                <onright>-</onright>
                <pulseonselect>no</pulseonselect>
                <font>ContentBody</font>
                <label>$VAR[ButtonMenuBg]</label> <!-- WORKING -->
            </control>
            <control type="image">
                <posx>20</posx>
                <posy>15</posy>
                <width>27</width>
                <height>27</height>
                <texture>$VAR[IconShutdown]</texture> <!-- WORKING -->
                </control>
            </control>
        </control>
        [...]
    </control>
    [...]
</controls>
Image
Reply
#4
Worked around this using conditional includes.
Image
Reply
#5
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?
Reply
#6
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.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
Texture Variable [DialogButtonMenu]0