Kodi Community Forum

Full Version: onclick animations
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to trigger an animation from onclick.. Basically can I use select as a condition for a animation..
Not specifically, but you could use a window property to trigger the animation.
e.g.
In your button or list control:
Code:
<onclick>SetProperty(MyAnimation,1,Home)</onclick>

And your animation:
Code:
<animation effect="fade" start="0" end="100" time="400" reversible="false" condition="!String.IsEmpty(Window(Home).Property(MyAnimation))">Conditional</animation>

You would need a way to do a
Code:
ClearProperty(MyAnimation,Home)

A couple of solutions:
As a alarm clock in the onclick
e.g.
Code:
<onclick>SetProperty(MyAnimation,1,Home)</onclick>
<onclick>AlarmClock(FinishAnim,ClearProperty(MyAnimation,Home),00:02,silent)</onclick>

Or you could clear it when a button or list is focused (could combine with AlarmClock in certain situations).
Code:
<onfocus>ClearProperty(MyAnimation)</onfocus>

or when your window opens in an <onload> for relevant windows
Thanks.. I was thinking setbool but with may be better... Hopefully it will work on the core sections as well
Yeah I'm not really sure what you could do for viewtypes in MyVideoNav etc. - iirc you can override the onclick, but I don't really know of a way to retrieve the built-in onclick command. I guess you would need a fake button that controls the list or something.
Yeah I think this idea may be a little to far plus after looking at it when click most time it changes to whatever almost instant ... So unless the animation forced a slow down then you probably would see it in it was another window ... Yeah sorry for the wasted time.