Need Help to Hide an Element.
#1
First sorry for my bad English,but i hope i can explain what my problem is.

I have placed a banner in the skin like you see in this screenshot.
The banner is seen when a banner.jpg is avaiable in the TV Folder
Image

So now the Problem,if no banner.jpg is avaiable i want it to look like this.
Image

The Problem is i cant get rid of the Border.
The Code looks like this
Code:
<control type="image">
    <posx>0</posx>
    <posy>0</posy>
    <width>514</width>
    <height>95</height>
    <aspectratio>stretch</aspectratio>
    <fadetime>200</fadetime>
    <bordersize>5</bordersize>
<texture background="true"diffuse="maskbanner.png">$INFO[ListItem.Path]banner.jpg</texture>
    </control>
    <control type="image">
    <posx>0</posx>
    <posy>0</posy>
    <width>514</width>
    <height>95</height>
    <aspectratio>stretch</aspectratio>
    <fadetime>IconCrossfadeTime</fadetime>
    <bordersize>5</bordersize>
    <texture>border-banner.png</texture>
    </control>

Problem is,how i can get rid of the Border if no banner,jpg is available?

Any help would be nice,
Thanks in Advance ...
Reply
#2
i tried it now with this code which almost work
Code:
<control type="image">
    <posx>0</posx>
    <posy>0</posy>
    <width>514</width>
    <height>95</height>
    <aspectratio>stretch</aspectratio>
    <fadetime>1</fadetime>
    <bordertexture>border-banner.png</bordertexture>
    <bordersize>1</bordersize>
    <texture background="true"  diffuse="maskbanner.png">$INFO[ListItem.Path]banner.jpg</texture>
                </control>

only problem now is when scrolling through the list,the border doenst change at time with the banner,it needs a little longer to get displayd which doenst look good.
Is there an other way to do this?
Reply
#3
No, the only way to do it is by having the label under the banner and adding a delay to it.

Check out Alaska Revisited's banner code.
Reply
#4
hm dont really get it.
Maybe i explained it bad.
When iam using this code
Code:
<control type="image">
    <posx>0</posx>
    <posy>0</posy>
    <width>514</width>
    <height>95</height>
    <aspectratio>stretch</aspectratio>
    <fadetime>200</fadetime>
    <bordersize>5</bordersize>
<texture background="true"diffuse="maskbanner.png">$INFO[ListItem.Path]banner.jpg</texture>
    </control>
    <control type="image">
    <posx>0</posx>
    <posy>0</posy>
    <width>514</width>
    <height>95</height>
    <aspectratio>stretch</aspectratio>
    <fadetime>IconCrossfadeTime</fadetime>
    <bordersize>5</bordersize>
    <texture>border-banner.png</texture>
    </control>

is there a way to hide the <texture>border-banner.png</texture> if no "banner.jpg" is available?
Reply
#5
No because there no visibility condition for images displayed that way.
Reply
#6
ok thank you.
could you point me in the wiki or forum to a thread where its explained how to do custom settings for a skin?
I searched wiki and forum but couldnt find what iam lokking for.
Reply
#7
I use this to have a fallback if no logo/extrathumb/clearART available, this type of <visible> only works outside of a List(wraplist/panel/list/etc..):

Quote:<control type="image" id="7400">
<posx>0</posx>
<posy>0</posy>
<width>514</width>
<height>95</height>
<aspectratio>stretch</aspectratio>
<fadetime>200</fadetime>
<bordersize>5</bordersize>
<texture background="true"diffuse="maskbanner.png">$INFO[ListItem.Path]banner.jpg</texture>
</control>
<control type="image">
<posx>0</posx>
<posy>0</posy>
<width>514</width>
<height>95</height>
<aspectratio>stretch</aspectratio>
<fadetime>IconCrossfadeTime</fadetime>
<bordersize>5</bordersize>
<texture>border-banner.png</texture>
<visible>!IsEmpty(Control.GetLabel(7400))</visible>
</control>

Give the thumb a id="xx" and then check for that using !IsEmpty(Control.GetLabel(xx)). But most people have users check a setting if using banner.jpg, wouldn't just be easier to use <visible>Skin.HasSetting(banner_jpg)</visible> on those two images?
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#8
thanks for your reply.
I did it now with setting for enable banner or not,this just works fine.
Thanks for all help!!
Reply

Logout Mark Read Team Forum Stats Members Help
Need Help to Hide an Element.0