include conditions for colordiffuse
#1
Ok, this is driving me nuts.

I'm working on implementing the film and tv network flagging.
I require the studio logos to be a light color in most screens, but a dark color in other screens. Because of this I make the logos a white color so I can use a colordiffuse to make them dark when needed.
I have a separate includes file containing all the substring stuff:

PHP Code:
<include name="networkFlags">
<
control type="image">
<
texture>flags/abc.png</texture>
<
visible>substring(listitem.Studio,abc)</visible>
<include 
condition="Control.IsVisible(52)">slideNetworkFlag</include>
<include 
condition="Control.IsVisible(54)">fanartviewNetworkFlag</include>
</
control>
</include> 

I defined the colordiffuse as well as dimensions and such in separate includes that are called based on the viewtype that is currently active. The includes are defined as such:

PHP Code:
<include name="slideNetworkFlag">
<
height>48</height>
<
aspectratio align="right">keep</aspectratio>
<
colordiffuse>Color1</colordiffuse>
</include>
<include 
name="fanartviewNetworkFlag">
<
height>48</height>
<
aspectratio align="left">keep</aspectratio>
<
colordiffuse>Color4</colordiffuse>
</include> 

Color1 is the light color, Color4 is the dark color.

The includes are called from myvideonav.xml:

PHP Code:
<control type="group">
<
visible>Control.IsVisible(54)</visible>
<
posy>546</posy>
<include>
networkFlags</include>
</
control>

<
control type="group">
<
visible>Control.IsVisible(52)</visible>
<
posy>546</posy>
<include>
networkFlags</include>
</
control

It will however always pick the first include condition defined in the include “networkFlags”, so always picking the dark color. So (seemingly) totally ignoring the include conditions. I’m sure I’m overlooking something but I can’t figure out what it is.

One guess though, is the "<visible>substring(listitem.Studio,abc)</visible>" condition sort of overriding the "<include condition="Control.IsVisible(52)">slideNetworkFlag</include>" condition?

Any ideas? I hope I described well enough.

btw, this is where http://trac.xbmc.org/ticket/4783 would make things less complicated Wink
Reply
#2
The include conditions are only evaluated on skin load. At this point no controls are visible I suspect.

I don't think it's doable without some sort of "skin variable" thing.
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
include conditions for colordiffuse0