[SOLVED] How to use Visible/Hidden with delay?
#1
I'm trying to use Kodi to create a revision aid for students. The idea is to use slideshow to play an image for a little while and then pop up the answer. What I'm trying to do is set the slideshow.nfo to show a picture for 30 seconds and after 20 seconds show the tag information (which shows artist name, painting title and year). I'm not sure if what I'm trying is possibe, but unsurprisingly I'm stuck trying to work out the visible/hidden control tag and the delay attribute.

So, what I'm trying as a control looks something like this, but of course doesn't work at the moment:

Code:
            <control type="label">
            <visible delay="20000"></visible>
                <posx>520r</posx>
                <posy>670</posy>
                <width min="10" max="500">auto</width>
                <wrapmultiline>true</wrapmultiline>
                <font>font-20bc</font>
                <label>$INFO[Slideshow.Caption]</label>
                <textcolor>white</textcolor>
            </control>

Can anyone suggest how I might get this to work?
Reply
#2
use a fade animation with a delay?
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
Thanks Ronie, I tried this:

Code:
            <control type="label">
            <animation effect="fade" delay="20000"></animation>            
                <posx>520r</posx>
                <posy>670</posy>
                <width min="10" max="500">auto</width>
                <wrapmultiline>true</wrapmultiline>
                <font>font-20bc</font>
                <label>$INFO[Slideshow.Caption]</label>
                <textcolor>white</textcolor>
            </control>

but it doesn't seem to have any effect. Should I be combining visible and animation?
Reply
#4
you'll probably have more luck with:
Code:
<animation effect="fade" start="0" end="100" time="500" delay="20000" condition="true">Conditional</animation>
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
#5
Thanks for the suggestion Ronie, but that's not having any effect either. I've tried using the basic confluence skin slideshow.xml with just that control added, and it doesn't matter if it's recursive or standard slideshow, randomised or not, the transition just goes straight to the next caption with no break.

It is reading the animation line, because if I change the "end" condition from 100 to 10 in your suggestion above the resulting text is virtually transparent, however delay seems to do nothing and if I extend the fade time from 500 to 15000 that has no effect either.
Reply
#6
try this one:
Code:
<animation effect="fade" start="0" end="100" time="500" delay="20000">WindowOpen</animation>
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
#7
Unfortunately, that only works on the first picture of the slideshow. Subsequent transitions just change the caption with no delay. Kodi evidently sees a slideshow as a single window, with a single opening occurence.
Reply
#8
ah, so the animation should run in a loop?

Code:
<animation type="Conditional" condition="true" loop="true">
    <effect type="fade" start="0" end="100" time="500" delay="20000"/>
    <effect type="fade" start="100" end="0" time="500" delay="29500"/>
</animation>

this anim will show the label after 20 secs, keep it visible for 10 secs and hide it again.
after that it starts all over again.

i'm not sure how easy it is to sync this animation with the slideshow picture duration,
you might have to play with the delay of the second fade anim a bit.
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
#9
Thank you so much Ronie. That works exactly like I hoped. If there is a syncing issue I should be able to build in enough slack for it not to be noticeable over the length of time we're thinking of. I hope that didn't take too much of your time to figure out - it is greatly appreciated.
Reply
#10
(2015-11-07, 22:19)ronie Wrote: ah, so the animation should run in a loop?
Code:
<animation type="Conditional" condition="true" loop="true">
    <effect type="fade" start="0" end="100" time="500" delay="20000"/>
    <effect type="fade" start="100" end="0" time="500" delay="29500"/>
</animation>

@ronie 

That was the solution to my problem - thanks!
But when go one page/container back, the controls are freezing until the animation time is up.

Any ideas?
Reply
#11
not really.... you could try if condition="Window.IsActive(window)" works better
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
#12
(2018-10-02, 22:08)chrissix Wrote: That was the solution to my problem - thanks!
But when go one page/container back, the controls are freezing until the animation time is up.

adding a: reversible="false" solved the problem kodi was not to control on page/container back until animation time is up. thx
Reply

Logout Mark Read Team Forum Stats Members Help
[SOLVED] How to use Visible/Hidden with delay?0