Kodi Community Forum
Triggering animations onclick for windowclose - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Triggering animations onclick for windowclose (/showthread.php?tid=359759)



Triggering animations onclick for windowclose - realcopacetic - 2021-01-11

Hi, I have a fade out/in animation on Window Close/Open between my home and viewscreens, which is fine.

I need to trigger some controls in dialogs (e.g. volumebar) at the start of the animation (i.e. when a button is pressed) to close the window rather than when the animation is complete, which is when !Window.IsVisible kicks in.

So far, the closest I got is with an onclick to set a window property on my home menu, but then the click doesn't work as it looks like it overwrites the built in click action. Is it possible to have more than one <onclick> and if so, what would be the action for the default action? If not, is there another way to trigger something at the start of the WindowClose animation instead of the end?


RE: Triggering animations onclick for windowclose - roidy - 2021-01-12

Doesn't Window.IsActive trigger at the start of the animation where as Window.IsVisible triggers at the end of the animation.

I think.... I could be wrong.


RE: Triggering animations onclick for windowclose - realcopacetic - 2021-01-13

(2021-01-12, 19:12)roidy Wrote: Doesn't Window.IsActive trigger at the start of the animation where as Window.IsVisible triggers at the end of the animation.

I think.... I could be wrong.
Looks like that's the case for dialogs, but I think it doesn't work for media windows, thanks for the suggestion though!!


RE: Triggering animations onclick for windowclose - realcopacetic - 2021-01-13

(2021-01-13, 22:06)QuizKid Wrote:
(2021-01-12, 19:12)roidy Wrote: Doesn't Window.IsActive trigger at the start of the animation where as Window.IsVisible triggers at the end of the animation.

I think.... I could be wrong.
Looks like that's the case for dialogs, but I think it doesn't work for media windows, thanks for the suggestion though!!
I think you put me on the right track though @roidy - think I got what I need with !Window.Next(window) - as that does seem to trigger on animation.

Thanks!