Hello Guest

Author Topic: How to have a progress bar.  (Read 3194 times)

test84

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
How to have a progress bar.
« 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.
« Last Edit: January 18, 2014, 03:40:31 pm by test84 »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: How to have a progress bar.
« Reply #1 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.