A gauge has six parts, four for the bar itself and two end caps. The four bar images should always be the same size. They are:
- Background
- Fill
- Lines (Highlight)
- LinesFilled
-The Background is always drawn in the back. It usually looks best if it is dark behind a bright gauge.
-The Fill is drawn on top of that, tinted with the RGB color of your gauge, and only drawn to the width of the current gauge value so that the Background shows at the right end.
-The Lines are drawn on top of the whole gauge untinted. They are used in the default gauge to make glassy highlights on the gauge bubbles.
-If you have FillLines turned on for a particular gauge, the LinesFilled image will be painted from the left, just like the Fill image, showing your progress through the current fifth of the bar. I think it is drawn on top of all the other layers.
The only truly necessary image for a gauge is the Fill image. The Fill image should be primarily a greyscale image if you want to use it for several different colored gauges and it should be fairly light in color. You can tint it dark with the RGB controls if you want dark gauges.
I personally don't like having little ticks fill up along the bottom of my gauges, like the blue lines in the default xp gauge, so I use the lines image as a highlight only and I don't define LinesFilled at all.
You can define the xml for your custom gauge images in your EQUI_Animations.xml file, in a custom xml file of your own design, or in the window file where you want to use the custom gauge. For example, I define the parts for a gauge I call "FiveGauge" which is made of five gems in a file named "GemGauges.xml". When I want to use the gauge in game, I specify the draw parameters like this:
Code:
<GaugeDrawTemplate>
<Background>FiveGaugeBackground</Background>
<Fill>FiveGaugeFill</Fill>
<Lines>FiveGaugeLines</Lines>
<EndCapLeft>FiveGaugeEndCapLeft</EndCapLeft>
<EndCapRight>FiveGaugeEndCapRight</EndCapRight>
</GaugeDrawTemplate>
If you leave out an element, it simply won't be drawn, so you can omit the end caps or the background as you wish.