[QUESTION] Control visibility conditions
#1
Is there a way to have a control hide and re-evaluate it's visible condition each time a list item changes?

Original thread:
http://forum.xbmc.org/showthread.php?tid=61036
Reply
#2
i guess you're looking for something like this:

Code:
<control type="foo">
   ...
   <animation effect="fade" start="100" end="0" time="0">Hidden</animation>
   <animation effect="fade" start="0" end="100" time="200">Visible</animation>
   <visible>!Container.OnNext + !Container.OnPrevious</visible>
</control>
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
If that works I'm gonna shoot myself right in the face. It's so simple I could have sworn I tried that or something very similar, I think I was using visiblechange instead of both a visible and hidden tag. Maybe that's why it didn't work right. Thanks for the help!
Reply
#4
The hidden animation type didn't work for some reason and actually made the control always visible.

I ended up with this instead; The second control is identical to the first and is only visible when the first control becomes hidden then fades itself out. I deleted an include from the second that contained the list item label so that it still kinda looks like it's fading out the first control.
PHP Code:
<control type="group" id="68">
        <
posy>646</posy>
        <
posx>0</posx>
        <
description>Wall View Bottom Bar Area</description>
        <include>
WallInfoPaneImage</include>
        <include>
WallInfoPaneMediaDetails</include>
        <
visible>!Container.OnNext + !Container.OnPrevious</visible>
        <
animation effect="fade" start="0" end="100" time="400" delay="2500">Visible</animation>
        </
control>
<
control type="group">
        <
posy>646</posy>
        <
posx>0</posx>
        <
description>Wall View Bottom Bar Area</description>
        <include>
WallInfoPaneImage</include>
        <
visible>!Control.IsVisible(68)</visible>
        <
animation effect="fade" start="100" end="0" time="200">Visible</animation>
</
control

Now as long as this works on the xbox I'll be happy! Thanks again for the help!
Reply

Logout Mark Read Team Forum Stats Members Help
[QUESTION] Control visibility conditions0