2D Toolkit Forum

2D Toolkit => Support => Topic started by: test84 on January 18, 2014, 03:32:50 pm

Title: How to have a progress bar.
Post by: test84 on January 18, 2014, 03:32:50 pm
Hi,

I was wondering what's the fastest way to have a progress bar in tk2d. Also I wan it to have a background or something so user can easily identify how much of the progress bar is currently filled.

Just found the progress bar prefab but two questions:

1- What are bare essentials to use UI elements like buttons or this progress bar?

2- Buttons and most UI elements ar eunder 2k2dUI_demo folder. Why it says demo? Does it mean we can't use them in

3- What's the best way to find and alter value of progress bar? For example, one game objects decides to change value of progress bar or progress bar needs to monitor value that it will show from another game object's value. What method do you suggest?

Thanks.
Title: Re: How to have a progress bar.
Post by: unikronsoftware on January 18, 2014, 11:25:39 pm
1. The progress bar prefab is sufficient.
2. The UI is set up in different ways in the UI demo folder. You can use anything you like from there.
3. uiDemoController.cs shows an example - basically add public tk2dUIProgressBar progressBar  drop your progress bar in the slot, then set progressBar.Value as you need it.