Skip to content

fading_bar_explained

just-Addict edited this page Jun 16, 2016 · 3 revisions

##FADING_BAR

###Fading Bar Explained

FADING_EXPLANATION

The image shown above is a composition of different arguments passed to the FADING_BAR.

From left to right the arguments used are:

  • from: 0.99 to: 0.00
  • from: 0.99 to: 0.10
  • from: 0.99 to: 0.20
  • from: 0.99 to: 0.40
  • from: 0.99 to: 0.80

As you can see all bars start from the outside which is controlled by the from argument, and fade into the color it is passing over when nearing the zero line.

The to argument controls the distance from the centerline where the fading starts, in the first bar this is very close to the zero line. The higher the second argument, the closer to the starting point the fading starts. In the last bar the second argument is almost as high as the first argument, and if you look closely you will see that the fade is ocurring over a shorter distance.

This fade distance is caused by the difference between the two arguments, the smaller the difference, the shorter the fade distance until it becomes a defined end when both arguments are equal.

However, when both arguments are equal, the bar will start to behave slightly different from its standard mode. As long as both values are equal, the bar will always start on the zero line, extending towards the top and bottom border.

Another effect of using equal values is that the seek bar will be identical to the position bar.

Things start to change again when you specify a lower value for the from argument than for the to argument. If the from argument is lower the bar will still start at the zero line, but now the fading will occur in the other direction, so towards the top and bottom border.

So, recapping:

  • outside to inside for the position bar and inside to outside for the seekbar when from is larger than to.
  • inside to outside for both the position bar and seekbar when both from and to are equal.
  • inside to outside for the position bar and outside to inside for the seekbar when from is smaller than to.
  • as long as both from and to are different values, the seekbar will be the opposite form of the position bar and the same when both arguments are equal.

Clone this wiki locally