Req Condition of a progress bar at 100%
#1
How can set a condition "when the progress bar reaches 100% then...(the image will be visible)"

I have to load an animation that will only take place when the progress bar has reached 100%.


xml:
          <control type="progress" id="500">
               <description>Progress Bar</description>
               <top>350</top>
               <left>240</left>
               <reveal>true</reveal>
            ...
            </control>
        
        
            <control type="image" id="600">
                <texture>Loading_complete.png</texture>
                <animation effect="fade" start="0" end="100" time="500" condition="progress(500)=100%">Conditional</animation>
            </control>


Here is an example of the condition I'm looking for...


Any help is always welcome
If i helped you, you can thank me with a thumbs up 👍 below, thanks 🙏.
Kodi 20.x stable release | Skin Confluence (by Jezz_X)
I like editing skins ❤
Reply
#2
You can get the value of the progress control using Control.GetLabel

xml:
<control type="image" id="600">
  <texture>Loading_complete.png</texture>
  <animation effect="fade" start="0" end="100" time="500" condition="Integer.IsEqual(Control.GetLabel(500),100)">Conditional</animation>
</control>

You could do it with a visiblechange animation:-

xml:
<control type="image" id="600">
  <visible>Integer.IsEqual(Control.GetLabel(500),100)</visible>
  <animation effect="fade" time="500">VisibleChange</animation>
  <texture>Loading_complete.png</texture>
</control>

You don't say what is driving the progress bar so you need to be careful because if it resets back to 0 or the progress bar is removed when it reaches 100% then the condition will break.
Reply
#3
@roidy
Perfect, so it works perfectly.

The wiki doesn't explain well what "VisibleChange" is for and therefore I wouldn't have known how to use it, but now I understand how to do it.
I never thought to use this command, also I didn't know that "progress" is identified as a label or textbox (because it's not written in the wiki...).

Thanks for your help, you've been essential.
If i helped you, you can thank me with a thumbs up 👍 below, thanks 🙏.
Kodi 20.x stable release | Skin Confluence (by Jezz_X)
I like editing skins ❤
Reply

Logout Mark Read Team Forum Stats Members Help
Condition of a progress bar at 100%0