Last version of Racer Free Sim (v. 0.8.0) features great graphical improvments. But several functionnalities have been added also. Amongst them, the new variable realtive to car's fuel consumption. Here I'll try to give you a few hints to use this function, in the particular case of Citroën Sm's linear fuel gauge I'm working on.
As Eric Rioult have confirmed it, Citroën Sm's fuel gauge works using a needle moving on a fixed drum. In order to represent it in Racer, I was looking for a needle moving lateraly, but Racer's documentation was lacking of a linear gauge type (wich indeed exists, I'm sure Ruud will add this in dials page). So I spend a few hours trying to hack a gauge. I won't explain it here, my English is too crappy to go into these details.
The fact is that I've mailed Ruud Van Gaal, asking him how he could help me with my messy issue, but I didn't expect his answer! He told me that a linear type allready exists in Racer, and dropped me some code to explain it. This code was used to improve a g-force gauge :
So, from this code, I've applied the method to my case. Here's the regular static background code :
Nothing new here, but sometimes it helps ;)
Then, the needle code :
With this code, needle's image have exactly the same dimensions as the background does, it allow to easily place it.
Et voilà! As usual, nothing is complex with some explanations! I think I'll re-use this kind of code for my C4 NT Faux-cabriolet drum speed gauge, but setting an image for each speed range. Fortunaltly, the C4 NT wasn't faster than 100 kph!