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

Multiple screen on one gauge

Messages
73
Hello !

I would like to develop a gauge, which displays informations in a particular function that you click on individual buttons.

I have 2 buttons, when I click button 1 I want the display element1 that contains a gaugetext.
When I click on button2 I would like to view the element2 which also contains a gaugetext.

On my first MouseClick i put this code on the script section :

Code:
(M:Event) 'leftSingle' scmp 0 == if{ 1 (>L:affichage, enum) }

On my second MouseClick i put this code on the script section :

Code:
(M:Event) 'leftSingle' scmp 0 == if{ 2 (>L:affichage, enum) }

On my first element i put this code on the visible section :

Code:
(L:affichage, enum) 1 ==

On my second element i put this code on the visible section :

Code:
(L:affichage, enum) 2 ==

Is that correct ?

thx in advance.
 
Last edited:
Nobody can help me ?

I try to with a another way :

Code:
<Gauge Name="Test" Version="1.0" Copyright="Praetorians-fs">
	<Image Name="background.bmp" ImageSizes="100,200" />
	<Element Id="bouton1">
		<Position X="0" Y="0" />
		<Image Name="bouton.bmp" ImageSizes="10,10" />
	</Element>
	<Element Id="bouton2">
		<Position X="20" Y="0" />
		<Image Name="bouton.bmp" ImageSizes="10,10" />
	</Element>
	<Mouse>
		<Area Left="0" Top="0" Width="30" Height="10">
		<Cursor Type="Normal" />
			<Area Left="0" Top="0" Width="10" Height="10">
			<Tooltip Id="Test1" />
			<Cursor Type="Hand" />
			<Click>(M:Event) 'leftSingle' scmp 1 == if { 1 (>L:affichage,enum) }</Click>
			</Area>
			<Area Left="20" Top="0" Width="10" Height="10">
			<Tooltip Id="Test2" />
			<Cursor Type="Hand" />
			<Click>(M:Event) 'leftSingle' scmp 1 == if { 2 (>L:affichage,enum) }</Click>
			</Area>
		</Area>
	</Mouse>
	<Element Id="zone_texte">
		<Position X="0" Y="20" />
		<Select>
			<Value>(L:affichage,enum)</Value>
			<Case Value="1">
				<String>Test1</String>
			</Case>
			<Case Value="2">
				<String>Test2</String>
			</Case>
		</Select>
	</Element>
</Gauge>
 
Nobody can help me ?

What? You expect instant answers? This isn't "instant chat" friend, we live all over the planet in different time zones...

In any event, everything from <Mouse> to </Mouse> must be at the bottom. You can't put it in the middle...
 
sorry for my impatience, thank you for the little information about the <mouse> tags

Regarding my code, I still can not either display: Test1 or Test2 using my buttons.

Code:
<Gauge Name="Test" Version="1.0" Copyright="Praetorians-fs">
	<Image Name="background.bmp" ImageSizes="300,400" />
	<Element Id="bouton1">
		<Position X="0" Y="0" />
		<Image Name="bouton.bmp" ImageSizes="10,10" Bright="Yes" />
	</Element>
	<Element Id="bouton2">
		<Position X="20" Y="0" />
		<Image Name="bouton.bmp" ImageSizes="10,10" Bright="Yes" />
	</Element>
	<Element Id="zone_texte">
		<Position X="0" Y="20" />
		<Select>
			<Value>(L:affichage,number)</Value>
			<Case Value="1">
				<Text Lenght="20" Color="0x00FF80" Bright="Yes">
					<String>Test1</String>
				</Text>
			</Case>
			<Case Value="2">
				<Text Lenght="20" Color="0x00FF80" Bright="Yes">
					<String>Test2</String>
				</Text>
			</Case>
		</Select>
	</Element>
	<Mouse>
			<Area Left="0" Top="0" Width="30" Height="10">
			<Cursor Type="Normal" />
				<Area Left="0" Top="0" Width="10" Height="10">
				<Tooltip>Test1</Tooltip>
				<Cursor Type="Hand" />
				<Click>
					(M:Event) &apos;LeftSingle&apos; scmp 0 ==  if { 1 (&gt;L:affichage,number) }
				</Click>
				</Area>
				<Area Left="20" Top="0" Width="10" Height="10">
				<Tooltip>Test2</Tooltip>
				<Cursor Type="Hand" />
				<Click>
					(M:Event) &apos;LeftSingle&apos; scmp 0 ==  if { 2 (&gt;L:affichage,number) }
				</Click>
				</Area>
			</Area>
		</Mouse>
</Gauge>
 
Last edited:
Lenght should be Length everywhere.

Do NOT type in these kinds of commands - copy and paste from a working gauge and then edit the numbers and variables!
 
Problem solved using this way :

Code:
<?xml version="1.0" encoding="UTF-8"?>

<SimBase.Document
        Type="AceXML"
        version="1,0"
        id="Test">
    <Descr>AceXML Document</Descr>
    <Filename>Test.xml</Filename>
    <SimGauge.Gauge id="Gauge" ArtDirectory="C:\TestGauges">
        <FloatPosition>0.000,0.000</FloatPosition>
        <Size>450,576</Size>
        <Image id="background.bmp" Name="background.bmp">
            <Transparent>True</Transparent>
        </Image>
        <Element id="Zone_Affichage">
            <FloatPosition>120.000,80.000</FloatPosition>
            <Select id="Select">
                <Expression id="(L:affichage,number)">
                    <Script>(L:affichage,number)</Script>
                </Expression>
                <Case id="Case1">
                    <ExpressionResult>1.000</ExpressionResult>
                    <GaugeText id="GaugeText">
                        <FontColor>red</FontColor>
                        <GaugeString>Test1</GaugeString>
                        <Size>215,13</Size>
                        <Transparent>True</Transparent>
                    </GaugeText>
                </Case>
                <Case id="Case2">
                    <ExpressionResult>2.000</ExpressionResult>
                    <GaugeText id="GaugeText">
                        <FontColor>red</FontColor>
                        <GaugeString>Test2</GaugeString>
                        <Size>215,13</Size>
                        <Transparent>True</Transparent>
                    </GaugeText>
                </Case>
            </Select>
        </Element>
        <MouseArea id="MouseAreaAll">
            <FloatPosition>0.000,0.000</FloatPosition>
            <Size>450,576</Size>
            <CursorType>Normal</CursorType>
            <MouseArea id="MouseArea">
                <FloatPosition>26.000,104.000</FloatPosition>
                <Size>31,22</Size>
                <CursorType>Hand</CursorType>
                <MouseClick id="MouseClick">
                    <Script>(M:Event) &apos;LeftSingle&apos; scmp 0 == if{ 1 (&gt;L:affichage,number) }</Script>
                    <ClickType>LeftSingle</ClickType>
                </MouseClick>
            </MouseArea>
            <MouseArea id="MouseArea">
                <FloatPosition>26.000,148.000</FloatPosition>
                <Size>31,22</Size>
                <CursorType>Hand</CursorType>
                <MouseClick id="MouseClick">
                    <Script>(M:Event) &apos;LeftSingle&apos; scmp 0 == if{ 2 (&gt;L:affichage,number) }</Script>
                    <ClickType>LeftSingle</ClickType>
                </MouseClick>
            </MouseArea>
        </MouseArea>
    </SimGauge.Gauge>
</SimBase.Document>

Thx for helping me :)
 
Back
Top