• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX Autopilot Gauge Question

Messages
76
Country
unitedkingdom
Hi all,

Sorry I am not the best this coding and hense adapt other gauges to suit my personal needs. I have created an autopilot gauge please see below.
It all works except for the mouse areas being not in the correct spots. I have looked at a help document and just don't get it. Where do the mouse
numbers come from ???? I imagine it is fairly simple I am just having trouble getting through my thick skull.


Many thanks
Matt
Age 44 1/2


Auto pilot below click the button it lights up

FTLSSjd.png

HQ2fCyt.png


<Gauge Name="Autopilot" Version="1.2">
<Image Name="AP_background.bmp"/>
<Element>
<Position X="95" Y="210"/>
<Select>
<Value>(A:Autopilot Heading Lock,bool)</Value>
<Case Value="0">
<Image Name="AP_ButtonOff.bmp"/>
</Case>
<Case Value="1">
<Image Name="HDG.bmp"/>
</Case>
</Select>
</Element>
<Element>
<Position X="95" Y="83"/>
<Select>
<Value>(A:Autopilot Flight Director Active,bool)</Value>
<Case Value="0">
<Image Name="AP_ButtonOff.bmp"/>
</Case>
<Case Value="1">
<Image Name="FD.bmp"/>
</Case>
</Select>
</Element>
<Element>
<Position X="91" Y="341"/>
<Select>
<Value>(A:Autopilot Altitude Lock,bool)</Value>
<Case Value="0">
<Image Name="AP_ButtonOff.bmp"/>
</Case>
<Case Value="1">
<Image Name="ALT.bmp"/>
</Case>
</Select>
</Element>
<Element>
<Position X="216" Y="214"/>
<Select>
<Value>(A:Autopilot Nav1 Lock,bool)</Value>
<Case Value="0">
<Image Name="AP_ButtonOff.bmp"/>
</Case>
<Case Value="1">
<Image Name="NAV.bmp"/>
</Case>
</Select>
</Element>
<Element>
<Position X="335" Y="210"/>
<Select>
<Value>(A:Autopilot Backcourse Hold,bool)</Value>
<Case Value="0">
<Image Name="AP_ButtonOff.bmp"/>
</Case>
<Case Value="1">
<Image Name="BC.bmp"/>
</Case>
</Select>
</Element>
<Element>
<Position X="214" Y="341"/>
<Select>
<Value>(A:Autopilot Approach Hold,bool)</Value>
<Case Value="0">
<Image Name="AP_ButtonOff.bmp"/>
</Case>
<Case Value="1">
<Image Name="VOR.bmp"/>
</Case>
</Select>
</Element>
<Element>
<Position X="215" Y="85"/>
<Select>
<Value>(A:Autopilot Master,bool)</Value>
<Case Value="0">
<Image Name="AP_Off.bmp"/>
</Case>
<Case Value="1">
<Image Name="AP.bmp"/>
</Case>
</Select>
</Element>
<Element>
<Position X="182" Y="37"/>
<Select>
<Value>(L:AP Test, bool) </Value>
<Case Value="1">
<Image Name="onAP.bmp"/>
</Case>
</Select>
</Element>
<Element>
<Position X="345" Y="349"/>
<Select>
<Value>(L:TRIMAP,bool)</Value>
<Case Value="1">
<Image Name="downtrimap.bmp"/>
</Case>
<Case Value="2">
<Image Name="uptrimap.bmp"/>
</Case>
</Select>
</Element>
<Mouse>
<Area Left="34" Top="49" Width="75" Height="84">
<Cursor Type="DownArrow"/>
<Click Kind="LeftSingle + LeftRelease"> (A:Autopilot Nav1 Lock,bool) (>L:NAV,bool) (A:Autopilot Heading Lock,bool) (>L:HDG,bool) (A:AUTOPILOT ALTITUDE LOCK,bool) 0 != if{ 0 (>K:AP_ATT_HOLD_ON) } (L:NAV,bool) 0 != if{ 0 (>K:AP_NAV1_HOLD_ON) } (L:HDG,bool) 0 != if{ 0 (>K:AP_HDG_HOLD_ON) } (M:Event) 'LeftSingle' scmp 0 == if{ 1 (>L:TRIMAP,bool) 1 (>L:BUFFER_BTN1,number) } (M:Event) 'LeftRelease' scmp 0 == if{ 0 (>L:TRIMAP,bool) } (L:TRIMAP,bool) 1 == if{ (>K:AP_PITCH_REF_INC_DN) } </Click>
<Tooltip ID="TOOLTIPTEXT_AUTOPILOT_PITCH_REF"/>
</Area>
<Area Left="35" Top="134" Width="75" Height="90">
<Cursor Type="UpArrow"/>
<Click Kind="LeftSingle + LeftRelease"> 1 (>L:BUFFER_BTN1,number) (A:Autopilot Nav1 Lock,bool) (>L:NAV,bool) (A:Autopilot Heading Lock,bool) (>L:HDG,bool) (A:AUTOPILOT ALTITUDE LOCK,bool) 0 != if{ 0 (>K:AP_ATT_HOLD_ON) } (L:NAV,bool) 0 != if{ 0 (>K:AP_NAV1_HOLD_ON) } (L:HDG,bool) 0 != if{ 0 (>K:AP_HDG_HOLD_ON) } (M:Event) 'LeftSingle' scmp 0 == if{ 2 (>L:TRIMAP,bool) 1 (>L:BUFFER_BTN1,number) } (M:Event) 'LeftRelease' scmp 0 == if{ 0 (>L:TRIMAP,bool) } (L:TRIMAP,bool) 2 == if{ (>K:AP_PITCH_REF_INC_UP) } </Click>
<Tooltip ID="TOOLTIPTEXT_AUTOPILOT_PITCH_REF"/>
</Area>
<Area Left="134" Top="62" Width="99" Height="81">
<Cursor Type="Hand"/>
<Click> 1 (>L:BUFFER_BTN1,number) (A:Autopilot Heading Lock,bool) (>L:HDG,bool) (>K:AP_PANEL_HEADING_HOLD) (L:HDG,bool) if{ (>K:AP_WING_LEVELER_ON) } </Click>
<Tooltip ID="TOOLTIPTEXT_AUTOPILOT_HEADING_HOLD"/>
</Area>
<Area Left="243" Top="63" Width="88" Height="81">
<Cursor Type="Hand"/>
<Click> 1 (>L:BUFFER_BTN1,number) (>K:SYNC_FLIGHT_DIRECTOR_PITCH) (>K:TOGGLE_FLIGHT_DIRECTOR) </Click>
<Tooltip ID="TOOLTIPTEXT_AUTOPILOT_FLIGHT_DIRECTOR_SWITCH"/>
</Area>
<Area Left="342" Top="62" Width="84" Height="81">
<Cursor Type="Hand"/>
<Click> 1 (>L:BUFFER_BTN1,number) (A:Autopilot Nav1 Lock,bool) (>L:NAV,bool) (A:Autopilot Altitude Lock,bool) (>L:ALT,bool) (A:Autopilot Heading Lock,bool) (>L:HDG,bool) 0 (>K:AP_ALT_HOLD) (L:ALT,bool) 0 != if{ 0 (>K:AP_ATT_HOLD_ON) } (L:NAV,bool) 0 != if{ 0 (>K:AP_NAV1_HOLD_ON) } (L:HDG,bool) 0 != if{ 0 (>K:AP_HDG_HOLD_ON) } </Click>
<Tooltip ID="TOOLTIPTEXT_AUTOPILOT_ALTITUDE_HOLD"/>
</Area>
<Area Left="145" Top="187" Width="85" Height="88">
<Cursor Type="Hand"/>
<Click> 0 (>K:AP_NAV1_HOLD) 1 (>L:BUFFER_BTN1,number) </Click>
<Tooltip ID="TOOLTIPTEXT_AUTOPILOT_NAV_HOLD"/>
</Area>
<Area Left="244" Top="187" Width="79" Height="88">
<Cursor Type="Hand"/>
<Click> 0 (>K:AP_BC_HOLD) 1 (>L:BUFFER_BTN1,number) </Click>
<Tooltip ID="TOOLTIPTEXT_AUTOPILOT_BC_HOLD"/>
</Area>
<Area Left="341" Top="190" Width="81" Height="88">
<Cursor Type="Hand"/>
<Click> 0 (>K:AP_APR_HOLD) 1 (>L:BUFFER_BTN1,number) </Click>
<Tooltip ID="TOOLTIPTEXT_AUTOPILOT_APP_HOLD"/>
</Area>
<Area Left="463" Top="93" Width="93" Height="84">
<Cursor Type="Hand"/>
<Click> 1 (>L:BUFFER_BTN1,number) (A:Autopilot master,bool) 0 == if{ (A:Autopilot Nav1 Lock,bool) (>L:NAV,bool) (A:Autopilot Heading Lock,bool) (>L:HDG,bool) (>K:AUTOPILOT_ON) (>K:AP_ALT_HOLD_OFF) (>K:SYNC_FLIGHT_DIRECTOR_PITCH) (>K:AP_ATT_HOLD_ON) (A:AUTOPILOT FLIGHT DIRECTOR ACTIVE, bool) 0 == if{ (>K:TOGGLE_FLIGHT_DIRECTOR) } (L:NAV,bool) 0 != if{ 0 (>K:AP_NAV1_HOLD_ON) } (L:HDG,bool) 0 != if{ 0 (>K:AP_HDG_HOLD_ON) } } els{ (A:AUTOPILOT MASTER,BOOL) 0 != if{ (>K:AP_MASTER) } } </Click>
<Tooltip ID="TOOLTIPTEXT_AUTOPILOT_MASTER"/>
</Area>
<!-- TEST DUMMY
-->
<Area Left="467" Top="205" Width="74" Height="61">
<Cursor Type="Hand"/>
<Click Kind="LeftSingle + LeftRelease"> (M:Event) 'LeftSingle' scmp 0 == if{ 1 (>L:ASD_SWITCH_PA31_TEST,number) } (M:Event) 'LeftRelease' scmp 0 == if{ 0 (>L:ASD_SWITCH_PA31_TEST,number) } </Click>
<Tooltip>%Autopilot Test%{end}</Tooltip>
</Area>
<Area Left="464" Top="0" Width="110" Height="93">
<Cursor Type="Hand"/>
<Click>0 (>K:pANEL_ID_TOGGLE)</Click>
</Area>
<Area Left="522" Top="4" Width="51" Height="33">
<Cursor Type="Hand"/>
<Click>0 (>K:pANEL_ID_TOGGLE)</Click>
</Area>
</Mouse>
</Gauge>
 
Messages
1,564
Country
thailand
From the gauge pixel measurements of your image. Use a painting/drawing program like MS Paint, GIMP, or Photoshop to measure the x,y gauge pixels.

As an example, here's your Mode Selector. It is a 515 pixel wide by 516 pixel tall image. If you measure the top, bottom, left and right of each button you get the following:

PIC.png


For the Flight Director button, the Area would be written <Area Left="79" Top="66" Width="117" Height="122"> where Width = 196-79=117 and Height = 188-66=122, and so forth.

Hope this helps,

Bob
 
Top