April 2, 200917 yr As an easy learning exercise I'm trying to edit an FSX XML heading indicator gauge. The goal is to display the autopilot heading setting in the Help ID for the heading bug adjust knob.In the original gauge, the mouse code section for the knob reads: <Mouse> <Help ID="HELPID_GAUGE_HEADING_INDICATOR"/> <Tooltip ID="TOOLTIPTEXT_HEADING_INDICATOR_HEADING"/> <Area Left="133" Right="161" Top="131" Bottom="159"> <Help ID="HELPID_GAUGE_HEADING_BUG_ADJUST"/> <Area Right="14"> <Cursor Type="DownArrow"/> <Click Event="HEADING_BUG_DEC" Repeat="Yes"/> </Area> <Area Left="14"> <Cursor Type="UpArrow"/> <Click Event="HEADING_BUG_INC" Repeat="Yes"/> </Area> </Area>And the Help ID shows:To modify it, from what little I can glean from the SDK, it seems simply replacing the line<Help ID="HELPID_GAUGE_HEADING_BUG_ADJUST"/> with<Help ID="HELPID_GAUGE_HEADING_BUG_ADJUST_WITH_DESCRIPTION"/>should add the autopilot heading setting, with the format "Heading Bug Adjust Knob (%1!d!
April 4, 200917 yr Hi,No examples here, but try something like:<Tooltip>%((A:Heading bug indicator, degrees))%!d!</Tooltip>Look for the correct synthax!Jan Jan "Beatus ille qui procul negotiis..."
April 4, 200917 yr Moderator It's difficult to tell from the description in the SDK, but...I think that is a lower case "l" and not a "1" in that line. A numeric one makes no sense, but the character "ell" does......since it is the command to "Load a value from a register to the top of the stack," which is what you'd need to supply a value for the display parameter! :( OTOH, it might be simpler to create a custom tooltip and be done with it, since the HELP_ID doesn't seem to work! <Mouse> <Area Left="133" Right="161" Top="131" Bottom="159"> <Tooltip>%((A:Heading bug indicator, degrees))%!d!</Tooltip> <Area Right="14"> <Cursor Type="DownArrow"/> <Click Event="HEADING_BUG_DEC" Repeat="Yes"/> </Area> <Area Left="14"> <Cursor Type="UpArrow"/> <Click Event="HEADING_BUG_INC" Repeat="Yes"/> </Area></Area> Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
April 4, 200917 yr Author OK, I tried using the Tooltip idea instead of HelpID, as follows: <Mouse> <Help ID="HELPID_GAUGE_HEADING_INDICATOR"/> <Tooltip ID="TOOLTIPTEXT_HEADING_INDICATOR_HEADING"/> <Area Left="133" Right="161" Top="131" Bottom="159"> <Tooltip>%((A:Heading bug indicator, degrees))%!d!</Tooltip> <Area Right="14"> <Cursor Type="DownArrow"/> <Click Event="HEADING_BUG_DEC" Repeat="Yes"/> </Area> <Area Left="14"> <Cursor Type="UpArrow"/> <Click Event="HEADING_BUG_INC" Repeat="Yes"/> </Area> </Area> <Area Left="1" Right="29" Top="131" Bottom="159"> <Help ID="HELPID_GAUGE_HEADING_INDICATOR_ADJUST"/> <Area Right="14"> <Cursor Type="DownArrow"/> <Click Event="GYRO_DRIFT_DEC" Repeat="Yes"/> </Area> <Area Left="14"> <Cursor Type="UpArrow"/> <Click Event="GYRO_DRIFT_INC" Repeat="Yes"/> </Area> </Area> </Mouse> What that produces is:While it shows a value of zero, that reading unfortunately never changes, no matter what the autopilot heading (it was 321 degrees at the time of this screen shot).But that seemed to be a step in the right direction, so I went back to the SDK Tooltip list and selected one calledTOOLTIPTEXT_AUTOPILOT_HEADING_INDICATOR"Heading Hold Selector (%((A:AUTOPILOT HEADING LOCK DIR, degrees) flr 360 % d 0 == if{ 360 })%!d!
April 4, 200917 yr Moderator Omit this if you are going to use a tooltip, as it won't be used anyway... <Help ID="HELPID_GAUGE_HEADING_INDICATOR"/> Ust ONE of the following: <Tooltip ID="TOOLTIPTEXT_AUTOPILOT_HEADING_INDICATOR"/><Tooltip>%((A:Heading bug indicator, degrees))%!d!</Tooltip><Tooltip>%((A:AUTOPILOT HEADING LOCK DIR, degrees) flr 360 % d 0 == if{ 360 }%!d! Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
April 5, 200917 yr Author BTW, more fun awaits if you decide you want to use the "FSX XML schema" - which at this point would be silly. FS9's schema works perfectly fine in both FS9 and FSX, so there's no real benefit to the "newfangled FSX schema" at all. :(If there is no downside to the FS9 schema, I have no desire to create unnecessary headaches.Is the FSX SDK independent of the FSX schema? For instance, are any of the Tooltip commands incompatible with the FS9 schema?What little I know about XML so far comes from Nick Pike's tutorials at fs2x, yours at fsdeveloper, and browsing the various gauge forums. Is there any other basic educational info out there?John
April 6, 200917 yr Moderator Aside from being excessively verbose and complex, there are remarkably few differences between the two XML schemas in terms of "what can be done."There are a few new vector drawing methods that've been added, but that's about all.The main reason for the new schema is so that it would comply with the new ACES scripting editor, which I despise with a passion... :( Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment