Posts: 901
Joined: Feb 2005
Reputation:
3
2007-10-09, 15:49
I'm converting one of my scripts to use WindowXML and trying, without success, to have a ControlList animate when it's hidden from a script.
In the lists XML I have:
<animation effect="slide" time="200" start="0,116" end="0,0" acceleration="-1.1" condition="Control.IsVisible(70)">conditional</animation>
It does animate when from within the script I set it visible:
self.getControl( 70 ).setVisible(True)
But, if I then .setVisible(False) it simply dissappears, without animation, regardless of any animate definitions in the XML.
eg.
<animation effect="slide" time="200" end="0,116" acceleration="-1.1">hidden</animation>
or even using 'VisibleChange'
Can any one help ?
Thanks
BBB
Posts: 901
Joined: Feb 2005
Reputation:
3
thanks for the advice, but having never created a xbmc build before, it may take a while to figure that out just to see if it works.
If your change would also cause an animation that had been set using the 'VisibleChange', 'Hidden' or 'Visible' attributes, it would be very useful ?
I checked several WindowXML based scripts, to see if any do anims based on script setting of visible state, but none do.
cheers
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
if you want to share you script with me, i can test.
Posts: 901
Joined: Feb 2005
Reputation:
3
Hi.
I've put together a simple test script, that should test the setVisible()
It consists of a simple single list that should slide ON / OFF the left of the screen when the script changes visible state.
To toggle visible state:
On xbmc_pc.exe , mouse over the list to gain focus, press RETURN
On xbox, press SELECT (A button)
I just need to know where to send it ?
cheers
Posts: 901
Joined: Feb 2005
Reputation:
3
Did it work when using 'VisibleChange' ?
<animation effect="slide" time="300" start="-220,0" acceleration="-1.1">VisibleChange</animation>
Posts: 901
Joined: Feb 2005
Reputation:
3
jm: any chance I could ask you to look into this again as it would be nice to be able to trigger anims for both Visible directions from a script ?
thanks
Posts: 707
Joined: Jul 2004
Reputation:
6
Hi
One year later, I have to deal with the same issue. Can't really animate a single label with visible or hidden type.
The only success I got is using conditional type :
<animation effect="slide" start="660,0" end="0,0" time="1000" condition="Control.IsVisible(602)">conditional</animation>
but it works only when the label got the setVisible(True) not False.
Any clue ? I can't really think nothing changed since 2008 !!