December 5, 200421 yr I am trying to create a gauge to show the spoilers status. I have already created the bitmaps which are 3(Down or off, Armed and Up) + the C-language files and I have compiled them into a successful static gauge. Now I need to make them capture the spoilers status.How can I do that? If someone knows the answer, please, help me out with that.- The bitmaps are 35x20 (width = 35).- I used ID
December 6, 200421 yr Hi ???,I assume you program this gauge in "C" ??If so: sorry, can't help.But if there's ever an example of a gauge for which programming in XML is easier, it's this one ... IMHO of course :-)In XML:(A:SPOILERS HANDLE POSITION,number):Gives spoiler handle position (0:retracted, 1:extended)(A:SPOILERS LEFT POSITION,percent):Gives actual spoiler position in percent.(allows you to show "in transition" status as well)(A:SPOILERS ARMED,bool):Is "1" when spoilers are armed.Depending on these variables, you jcan show one of three bitmaps.(whatever your bit map is).If you also want to show transition state, more display functionality is needed of course (a needle, textstring, ??)Cheers, Rob Barendregt
December 6, 200421 yr Yes, I do program in c.But you helped me a lot. This hint showing the variables is a start.Thanks!!!Silvestre Bittencourt
December 6, 200421 yr If you don't already have it, download the panels SDK at:http://www.microsoft.com/games/flightsimul..._sdk.asp#panelsThe MAKE_ICON macro calls a function that you will use to determine the which icon element will be displayed - the icon displayed will be based on the return value of the function. I believe you will have to number the icon elements consecutively, ie. 0x1000, 0x1001, 0x1002.Hope that helps.Doug Dawson
December 19, 200421 yr Thank you, Doug, for ur repply.I finally did find out what was wrong with my code.When I used the fuel-selector sample from the panel sdk to create my own code, I simply copied the line : "pelement->source_var.var_value.e". The SPOILERS_HANDLE_POS viriable requires "pelement->source_var.var_value.n".Sorry for having taken so long to answer.. I can only get on line every other weekend.Thank you very much.Silvestre Bitencourt.
Create an account or sign in to comment