Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Mogaba on April 25, 2014, 06:33:20 PM
-
Hello,
I realize that there is already an existing thread on this issue, but it has been inactive for some time and it is not really concerning my main question, so I decided to post a new thread.
I am referencing the thread here:
http://www.tasharen.com/forum/index.php?topic=3976.0;prev_next=prev
My problem is that I want to use radial fill, but in a way that it follows the contour of a circle and does not cut it at an angle. Is this possible? I'm assuming that I need to alter the Radial180 option of FilledFill() but I don't really know where to begin.
Thank you!
-
Radial 360 is what cuts a circle using full 360 degrees. 180 is only half a circle. What is it you're trying to do?
-
Basically I have the border of a half-circle that I am attempting to use as a progress bar, and am filling it incrementally.
The problem I am trying to solve is that while it is being filled, the end of the circle is being cut off at an angle, but what I want is for it to be cut off flat.
Is there any possible way to do this using NGUI?
-
Since you mention being cut off at an angle I'm going to assume that you don't actually have a half circle there, but rather a quarter-circle or something similar, because using a 180 degree fill on a half circle would cut it at exactly the right angle. Unfortunately there is nothing in NGUI that would let you have some arbitrary cutting out of the box. You can write a custom fill option by deriving either from UISprite, or -- more easier -- from UITexture and then writing your own OnFill function.
In Windward I had curved health bars on ships (about a 30 degree bend), but I wasn't doing anything fancy with them. I was simply using a vertical fill and yet many assumed I had some curved fill when I didn't.
-
Hello,
Thank you very much for the response.
I have been playing around with this a little, and I actually think my problem can be solved simply by changing fillRadial360 to start from the bottom of the circle, instead of the top. Do you know if this is possible?
-
Nevermind, got it! ;D
I just switched around the v.y and v.w's, and the v.x and v.z's in the lerps and got exactly the behavior I wanted.
Seems painfully obvious to me in hindsight -___-
Thank you!