Page 1 of 1

Pro tip for Gauges

Posted: 21 Dec 2015, 20:02
by Dommy
I just discovered it now and want to share my knowledge to you :mrgreen:

If you want your gauge to start showing its light exactly at the beginning, you must reduce ratio with this method:

Code: Select all

declare GaugeCutOff = 4 / Gauge.Size.X;
Gauge.Ratio = TargetRatio * (1 - GaugeCutOff) + GaugeCutOff;
:thumbsup:

Re: Pro tip for Gauges

Posted: 02 Jan 2016, 19:13
by reaby
thanks, good tip!

Re: Pro tip for Gauges

Posted: 03 Jan 2016, 13:00
by Dommy
One more hint: if you're using gauge with drawbg="0" and drawblockbg="0", you might notice small glow when TargetRatio is 0. To prevent this just hide gauge when TargetRatio <= 0.