View Single Post
Old 04-26-2013, 09:36 AM   #13
valaury3169
Enhanced Imperial Golem
 
Join Date: Jun 2008
Posts: 204
Interface Author - Click to view interfaces
Default

I have not played with color changing gauges, but my understanding of how this works leads me to believe that the super long gauges and whatnot need to use the width of your gauge as the multiplier instead of simply 100. If you don't, your math is not going to work out and you may get unexpected results. Let me explain because it may help you get the math better.

The real key in making this work is the 'hiding' gauge. For simplicity's sake, I'll just use a gauge that is 100 pixels wide. When the standard gauge ticks off, it erases 1 line of pixels at a time. This matches up to a percent; 1 percent=1pixel. In order for the hiding gauge to disappear completely and in synch, it needs to erase 100 pixels at a time. So the width then needs to be 10000; 1 percent= 100 pixels. So, if you expand your gauge to 138 pixels, your 'hiding' gauge needs to be 13800 so that 1 percent=138 pixels.

Because of the offsets, you may be able to get away with just 10000, but using the gauge width as the multiplier should make all of the math synch up and make more sense. It should also make calculating the offsets easier as well.

Hopefully this helps.
valaury3169 is offline   Reply With Quote