• 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.

FS2004 Correct syntax please.

Messages
1,468
Country
italy
I have a six position switch with six clickspots. The sim though doesn't like the syntax.
I have this which doesn't work. The gauge is divided into 6 areas. 3 on the left and 3 on the right.
Code:
<Mouse>
<Tooltip>AC Selector</Tooltip>
      <Area Left="0" Top="0" Right="281" Bottom="190">
        <Cursor Type="Hand"/>
         <Click>0 (&gt;G:Var1)</Click>
      </Area>
      <Area Left="0" Top="191" Right="281" Bottom="380">
         <Cursor Type="Hand"/>
         <Click>1 (&gt;G:Var1)</Click>
      </Area>
      <Area Left="0" Top="381" Right="281" Bottom="570">
         <Cursor Type="Hand"/>
         <Click>2 (&gt;G:Var1)</Click>
      </Area>
      <Area Left="282" Top="0" Right="564" Bottom="190">
         <Cursor Type="Hand"/>
         <Click>3 (&gt;G:Var1)</Click>
      </Area>
      <Area Left="282" Top="191"Right="564" Bottom="380">
         <Cursor Type="Hand"/>
         <Click>4 (&gt;G:Var1)</Click>
      </Area>
      <Area Left="282" Top="381" Right="564" Bottom="570">
         <Cursor Type="Hand"/>
         <Click>5 (&gt;G:Var1)</Click>
      </Area>
     
     
   </Mouse>
I'm pretty sure I have another gauge with a similar systax so it's a mystery (for me :) )why this doesn't seem to want to work.
Many thanks.
 
I don't see any coding issues in that section. Perhaps there is other code in that gauge that changes the value of the G: variable? Or perhaps the background image is not properly defined? Or the background image is not at least as big as 564 by 570 pixels?
 
Try adding a wrapping mouse area for the six clickspots.

Code:
<Mouse>
 <Area Left="0" Top="0" Right="564" Bottom="570">
<Tooltip>AC Selector</Tooltip>
     <Area Left="0" Top="0" Right="281" Bottom="190">
       ...
     </Area> 
      </Area>
   </Mouse>
 
Try adding a wrapping mouse area for the six clickspots.

Code:
<Mouse>
 <Area Left="0" Top="0" Right="564" Bottom="570">
<Tooltip>AC Selector</Tooltip>
     <Area Left="0" Top="0" Right="281" Bottom="190">
       ...
     </Area>
      </Area>
   </Mouse>

How would that work H? I'll try it out obviously.
 
I don't see any coding issues in that section. Perhaps there is other code in that gauge that changes the value of the G: variable? Or perhaps the background image is not properly defined? Or the background image is not at least as big as 564 by 570 pixels?

The Gvar is not yet coded other than what you see. All the images are exactly the same size. And the dimensions should be within the size limit. I did in fact reduce them to what you see and it still doesn't want to work. I imagine that the problem might still reside there though.

I have tried with significantly smaller dimensions with the same problem.
 
Last edited:
Here is an image of the switch in question. It is a rotary switch in effect with six positions.The image is with night lighting, sorry!
nt.jpg

I have tried with a much smaller area of clickspot space and it definately seems to be the syntax that is not correct.
 
Last edited:
How would that work H? I'll try it out obviously.

As far as I know, if you want a tooltip for the entire mouse area, you need an extra area definition, as demonstrated in my above example.

Alternative 1: Add the tooltip to every area definition.

Alternative 2: Add a single definition for the entire area and discriminate between left and right clicks to increment/decrement the G: Var.
 
Ok Gents, many thanks. I have finally managed to get it to work. What was wrong is a mystery. Clearly it is very sensitive. But, likely it was a knickers in a twist coding!
Code:
<Gauge Name="AC Selector Switch" Version="1.0">
   <Element>
      <Select>
         <Value>(G:Var1)</Value>
         <Case Value="0">
            <Image Name="Gen_sel_sw_4.bmp"/>
         </Case>
         <Case Value="1">
            <Image Name="Gen_sel_sw_5.bmp"/>
         </Case>
         <Case Value="2">
            <Image Name="Gen_sel_sw_6.bmp"/>
         </Case>
         <Case Value="3">
            <Image Name="Gen_sel_sw_3.bmp"/>
         </Case>
         <Case Value="4">
            <Image Name="Gen_sel_sw_2.bmp"/>
         </Case>
         <Case Value="5">
            <Image Name="Gen_sel_sw_1.bmp"/>
         </Case>
      </Select>
   </Element>
   <Mouse>
      <Tooltip>AC Selector</Tooltip>
      <Area Left="0" Top="0" Width="281" Height="190">
         <Cursor Type="Hand"/>
         <Click>0 (&gt;G:Var1)</Click>
      </Area>
      <Area Left="0" Top="191" Width="281" Height="190">
         <Cursor Type="Hand"/>
         <Click>1 (&gt;G:Var1)</Click>
      </Area>
      <Area Left="0" Top="382" Width="281" Height="190">
         <Cursor Type="Hand"/>
         <Click>2 (&gt;G:Var1)</Click>
      </Area>
      <Area Left="282" Top="0" Width="280" Height="190">
         <Cursor Type="Hand"/>
         <Click>3 (&gt;G:Var1)</Click>
      </Area>
      <Area Left="282" Top="191" Width="280" Height="190">
         <Cursor Type="Hand"/>
         <Click>4 (&gt;G:Var1)</Click>
      </Area>
      <Area Left="282" Top="382" Width="280" Height="190">
         <Cursor Type="Hand"/>
         <Click>5 (&gt;G:Var1)</Click>
      </Area>
   </Mouse>
</Gauge>
 
Back
Top