Made the progress bar look a little nicer / match the overall UI more.
This commit is contained in:
parent
3339a851f8
commit
1f7d0cdfb6
3 changed files with 4 additions and 3 deletions
Binary file not shown.
Binary file not shown.
|
@ -136,18 +136,19 @@ namespace PedometerU.Tests {
|
|||
*/
|
||||
|
||||
// Was used for testing.
|
||||
private float tempcounter = 0.1f;
|
||||
//private float tempcounter = 0.1f;
|
||||
|
||||
public void updateProgressBar()
|
||||
{
|
||||
//Debug.Log (background.rectTransform.rect.width + " " + background.rectTransform.rect.height);
|
||||
barSize.x = background.rectTransform.rect.width;
|
||||
barSize.y = background.rectTransform.rect.height;
|
||||
|
||||
tempcounter += 0.0005f;
|
||||
//tempcounter += 0.0005f;
|
||||
|
||||
// resize the fill.
|
||||
RectTransform temp = fill.rectTransform;
|
||||
temp.sizeDelta = new Vector2 (barSize.x * tempcounter, barSize.y);
|
||||
temp.sizeDelta = new Vector2 (barSize.x * barDisplay, barSize.y);
|
||||
temp.anchoredPosition = new Vector2 (temp.rect.width * 0.5f - (barSize.x * 0.5f),0);
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue