Progress Bar with Time


#1


I have to make a progress bar that works according to time, eg, time is 3 minutes, and three minutes, you should get 100% 
However, I do not know how to do and / or continued, could someone help me, or if possible, place a small code snippet explaining? 
Thank you.
 


#2

Did you have a look at the DemoBackgroundThread in the [url=https://github.com/julianstorer/JUCE/blob/master/extras/Demo/Source/Demos/DialogsDemo.cpp]DialogsDemo.cpp[/url] of the Juce Demo?


#3

P.S.: Are you sure it is a good idea to do something like that within an audio plugin?


#4

Well, it was requested that the project did with this progress screen, which showed that part of the song is (in percentage). 

I also found it weird and / or unnecessary, however, was asked what I did.

Well, it was requested that the project did with this progress screen, which showed thatpart of the song is (in percentage). 
I also found it weird and / or unnecessary, however, was asked what I did.

#5

I wanted the progress bar was something like the image, where I would say the time needed to go from 0 to 100.

Image: http://imgur.com/oywYV4V


#6

Use a Slider, a Timer with a 30ms callback and update it's position according to the current time / the song length:

void timerCallback()
{
    const double ratio = getCurrentSongTime() / songLength;
    positionSlider->setValue(ratio, dontSendNotification);
}

 


#7


Your idea of using a slider is very convenient, however, would need to see how the two forms to the coordinator ... do not complain if I do not get with the progress bar will be even with the slider. 
Without being boring, as would be the case I would use code a progress bar for this?