Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Markov on August 03, 2014, 02:00:51 AM

Title: Calculate actual progress bar's foreground width
Post by: Markov on August 03, 2014, 02:00:51 AM
Hello.
I'm trying to calculate width of progress bar foreground with NGUIMath.CalculateRelativeWidgetBounds, but it returns original size of this texture. So how to calculate actual size?
UPD: this foreground is a sliced texture so i can't just multiply original size of texture by progressBar.value.
Title: Re: Calculate actual progress bar's foreground width
Post by: ArenMook on August 03, 2014, 09:55:52 AM
UIWidget.drawingDimensions is what determines the actual dimensions clipped by the Draw Region setting. Alternatively you have to take UIWidget.drawRegion into consideration yourself.
Title: Re: Calculate actual progress bar's foreground width
Post by: Markov on August 03, 2014, 02:21:23 PM
Thanks!