Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: SpiritOpportunity on May 11, 2015, 03:19:24 AM

Title: How to make Progress Bar with round tip (foreground)
Post by: SpiritOpportunity on May 11, 2015, 03:19:24 AM
I want to make a progress bar like this one (image attached)
I really searched a lot but.. I just couldn't find the way

I think it's not possible with NGUI.
Maybe a way to do it some other way? Or is there a way to do it with NGUI ?
Title: Re: How to make Progress Bar with round tip (foreground)
Post by: Razhagal on May 11, 2015, 05:25:41 AM
Your image need to be with rounded corner as well.
Title: Re: How to make Progress Bar with round tip (foreground)
Post by: SpiritOpportunity on May 11, 2015, 09:12:26 PM
Your image need to be with rounded corner as well.

In that way, I have to set the UISprite type to simple, and this causes the bar to strech when value changes.
So the rounded corner shape changes, and it looks weird this way
Title: Re: How to make Progress Bar with round tip (foreground)
Post by: Razhagal on May 12, 2015, 03:13:04 AM
You can use it as sliced and just slice it little before the round corners on the sides. That way only the middle part will stretch. The only real problem is the stripes that are going to be stretched. You can test different variants with sprite length to see how it looks like. In our game we have very similar progress bars and it's barely noticeable. Try with sprite length half the progress background.
Title: Re: How to make Progress Bar with round tip (foreground)
Post by: SpiritOpportunity on May 12, 2015, 07:19:31 PM
You can use it as sliced and just slice it little before the round corners on the sides.

How can you slice like that?


EDIT: I think I found it, UISprite -> Sprite -> Edit -> Border
Give value to border left and right? Think it works
Thanks :) @Razhagal
Title: Re: How to make Progress Bar with round tip (foreground)
Post by: Razhagal on May 13, 2015, 09:11:57 AM
UISprite -> Sprite -> Edit -> Border
Give value to border left and right? Think it works
Yea, that's it. You can do a lot of nice stuff with slicing - mostly reducing your textures size a lot.