2009-05-17, 17:14
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:
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:
Color1 is the light color, Color4 is the dark color.
The includes are called from myvideonav.xml:
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
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