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

mousearea ok in 2D panel, not 3D

B21

Messages
149
Country
unitedkingdom
I have been struggling with this for ages - please help if it is a well know novice mistake:

I have been trying to get the simplest possible mousearea to appear on my simplest possible gauge, and there seems to be some complex subtlety with the coordinates within the gauge in the 3D view, because the mousearea behaves strangely. Here is the code for the ENTIRE gauge, which doesn't do anything useful but illustrates my problem:

Code:
<SimBase.Document Type="AceXML" version="1,0" id="variometer">
    <Filename>variometer.xml</Filename>
    <SimGauge.Gauge id="vario">
        <FloatPosition>0.000,0.000</FloatPosition>
        <Size>90,90</Size>
        <MouseArea id="MouseArea">
            <FloatPosition>0.000,0.000</FloatPosition>
            <Size>90,90</Size>
            <MouseArea id="Go">
                <FloatPosition>5.000,0.000</FloatPosition>
                <Size>78,35</Size>
                <CursorType>DownArrow</CursorType>
                <Tooltip id="Tooltip">Testing MouseArea</Tooltip>
            </MouseArea>
        </MouseArea>
    </SimGauge.Gauge>
</SimBase.Document>

In 2D mode, the mousearea behaves as expected, i.e. I get a DownArrow cursor (a hand with a minus) appear anywhere I wave the mouse around inside the area of the 'Go' mousearea, which I've sized to fill the top third of the instrument.

In 3D mode, the DownArrow cursor *only* appears in tiny areas near BOTH right and left edges at the top third of the instrument - so it seems like the box is there but is somehow being masked in a complex way.

For completeness here's my panel.cfg vcockpit section:
Code:
[VCockpit01]
file=DG808s_Panel_Gauges_2.bmp
size_mm=256,256
pixel_size=256,256
texture=$DG808s_Panel_2
background_color=0,0,0

gauge00=DG808S!asi, 10, 13, 103, 104
gauge01=b21_vario_netto!variometer, 14, 152, 90, 90
gauge02=DG808S!altimeter, 127, 140, 115, 115
gauge03=DG808S!nav_display, 130, 5, 121, 122

[VCockpit02]
file=DG808s_Panel_Gauges_1.bmp
size_mm=256,256
pixel_size=256,256
texture=$DG808s_Panel_1
background_color=0,0,0

gauge00=b21_vario_te!b21_vario_te57, 17, 15, 99, 99
gauge01=DG808S!turn_bank, 11, 142, 78, 78
gauge02=DG808S!oat, 232, 118, 10, 44
gauge03=DG808S!electrical_buttons, 190, 189, 64, 65
gauge04=DG808S!radio, 140, 3, 91, 91
gauge05=DG808S!transponder, 137, 101, 81, 81
gauge06=DG808S!compass, 103, 194, 81, 59
gauge07=n_number_plaque!n_number_plaque, 0, 231, 89, 25

Any help greatly appreciated...

B21
 
B21,

Your XML size is 90 pixels by 90 pixels, and 78 by 35 but you set your vc to 90 mm by 90 mm. Is this what you truly indended? Is you vc panel bit map square and a power of 2 (assume 256 x 256 correct)

If size_mm = 1024 then XML size = guage01 H, W sizes, acording to the SDK. I don't see that.

Also I don't see pixel_size and a parameter in SP2 for panel config. - edit - never mind - see it in the C172 panel - hmmmm....

I'm not a guage expert - just learning myself.
 
Last edited:
thanks ron, but both the gauge and the panel started off stock FSX DG808S (the glider) and I never altered the size_mm or other panel settings.

All I did was took the existing variometer.xml and tried to add a mousearea in the top middle of the gauge but got the strange behaviour:
b21_vario_netto.jpg


The wierd thing is when I added a mousearea across the full width of the gauge extending from the top to about a third of the way down, it only 'worked' in a couple of small places (roughly where the red arrow is pointing, and the symmetrical point on the right side of the gauge. But the mousearea does not work *between* the two points, which can't be explained in terms of the simple rectangle I define the mousearea with.

To keep things simple, I was able to replicate the behaviour with the code above. As with the variometer, the gauge is 90x90, and the mousearea is 78x35 positioned at 5,0 - i.e. nearly the full width at the top of the gauge, taking up a third of the gauge.

My question really is whether something in the 3D panel can affect the mousearea of a gauge which otherwise behaves normally in 2D ??

B21
 
I can't reproduce your strange behaviour. I have created a stopwatch XML guage and added a mouse area to similar co-ordinates you have. I also have my size_mm=1024 and pixel_size=1024. Scaling back my panel.cfg to 256 did not change anything. The only thing I see wrong is the tooltip part. - that will not work. perhaps delete that or use <deafaultscript>

Code:
        <MouseArea id="MouseArea All">
            <FloatPosition>0.000,0.000</FloatPosition>
            <Size>110,120</Size>
            <MouseArea id="MouseArea Start Stop">
                <FloatPosition>0.000,5.000</FloatPosition>
                <Size>75,35</Size>
                <CursorType>DownArrow</CursorType>
                <Tooltip id="Tooltip">
                    <DefaultScript>test tooltip</DefaultScript>
                </Tooltip>
            </MouseArea>
        </MouseArea>
 
That is no longer what the ACES tool auto generates. You don't have the option of just "your text here".
 
Thanks Ron it's really kind of you to help. Which panel did you put your gauge in? I'm suspecting the 3D model of the panel makes a difference somehow and I'll test my gauge in the panel of the aircraft you used.

cheers - B21
 
I just created a test panel poly in GMAX - .4m x .5m and applied a 1024 x 1024 black (8 bit) texture to it, .5m x .5m.

I placed the stopwatch guage on it and it worked.

panel.cfg

Code:
//--------------------------------------------------------
[Window00]
file=Pnl.bmp 
file_1024=pnl.bmp
size_mm=1024,768
position=7
visible=1
ident=MAIN_PANEL
sizeable=1
render_3d_window=1
window_size= 1.000, 1.000
window_pos= 0.000, 0.000

gauge00=stoppanel!stopwatch, 590,696,110,120

//--------------------------------------------------------
[VCockpit01]
size_mm=1024,1024
pixel_size=1024,1024
texture=$vcpanel1
Background_color=0,0,0

gauge00=stoppanel!stopwatch, 396,379,110,120

xml guage

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

<SimBase.Document
        Type="AceXML"
        version="1,0"
        id="stopwatch">
    <Descr>AceXML Document</Descr>
    <Filename>stopwatch.xml</Filename>
    <SimGauge.Gauge id="Gauge">
        <FloatPosition>0.000,0.000</FloatPosition>
        <Size>110,120</Size>
        <Element id="Element">
            <FloatPosition>50.000,60.000</FloatPosition>
            <Circle id="Circle">
                <Axis>50.000,50.000</Axis>
                <Radius>50</Radius>
                <FillColor>black</FillColor>
                <LineWidth>3</LineWidth>
                <LineColor>steelblue</LineColor>
            </Circle>
        </Element>
        <Element id="60">
            <FloatPosition>40.000,14.000</FloatPosition>
            <GaugeText id="GaugeText">
                <FontColor>gold</FontColor>
                <FontFace>Arial</FontFace>
                <FontHeight>12</FontHeight>
                <GaugeString>60</GaugeString>
                <HorizontalAlign>CENTER</HorizontalAlign>
                <Size>20,20</Size>
                <Transparent>True</Transparent>
                <VerticalAlign>CENTER</VerticalAlign>
            </GaugeText>
        </Element>
        <Element id="30">
            <FloatPosition>40.000,96.000</FloatPosition>
            <GaugeText id="GaugeText">
                <FontColor>gold</FontColor>
                <FontFace>Arial</FontFace>
                <FontHeight>12</FontHeight>
                <GaugeString>30</GaugeString>
                <HorizontalAlign>CENTER</HorizontalAlign>
                <Size>20,20</Size>
                <Transparent>True</Transparent>
                <VerticalAlign>CENTER</VerticalAlign>
            </GaugeText>
        </Element>
        <Element id="45">
            <FloatPosition>4.000,55.000</FloatPosition>
            <GaugeText id="GaugeText">
                <FontColor>gold</FontColor>
                <FontFace>Arial</FontFace>
                <FontHeight>12</FontHeight>
                <GaugeString>45</GaugeString>
                <HorizontalAlign>CENTER</HorizontalAlign>
                <Size>20,20</Size>
                <Transparent>True</Transparent>
                <VerticalAlign>CENTER</VerticalAlign>
            </GaugeText>
        </Element>
        <Element id="15">
            <FloatPosition>84.000,55.000</FloatPosition>
            <GaugeText id="GaugeText">
                <FontColor>gold</FontColor>
                <FontFace>Arial</FontFace>
                <FontHeight>12</FontHeight>
                <GaugeString>15</GaugeString>
                <HorizontalAlign>CENTER</HorizontalAlign>
                <Size>20,20</Size>
                <Transparent>True</Transparent>
                <VerticalAlign>CENTER</VerticalAlign>
            </GaugeText>
        </Element>
        <MouseArea id="MouseArea All">
            <FloatPosition>0.000,0.000</FloatPosition>
            <Size>110,120</Size>
            <CursorType>Normal</CursorType>
            <MouseArea id="MouseArea Start Stop">
                <FloatPosition>0.000,5.000</FloatPosition>
                <Size>75,35</Size>
                <CursorType>DownArrow</CursorType>
                <Tooltip id="tooltip test">
                    <DefaultScript>test tooltip</DefaultScript>
                </Tooltip>
                <MouseClick id="MouseClick start stop">
                    <ClickType>LeftSingle+LeftRelease</ClickType>
                </MouseClick>
            </MouseArea>
        </MouseArea>
    </SimGauge.Gauge>
</SimBase.Document>
 
That is no longer what the ACES tool auto generates. You don't have the option of just "your text here".

Oh, okay. I tried the "ACES.exe" program and found it was too painful to work with...

I can create and test an XML script in five minutes that'd take a half-hour using that "tool..." :wizard:
 
thanks - I'll try that stopwatch gauge in the DG808S panel - I'll have to tweak the size to 90x90 though but that shouldn't alter things as there's no bitmaps.

I'm going to guess the stopwatch mousearea then behaves the same as my gauge. I've highlighted the mousearea with the 'working' portion in red - it really seems like there's some feature of the panel affects it:

mousearea.jpg


Re the tool - I have to admit I find it easier just to edit the xml. I don't really get the tool layout though - my preview window displays the gauge at 90x90 pixels which is a bit small to be useful and the window is mostly blank green space. I load my gauge in the tool just to error-check it though.

B21
 
I agree they Aces tool is not very nice, but then how long will the "old" code be valid - will it be valid for FS11. Or is the Aces tool not up to date with the latest XML coding scheme.

I also see that MouseArea is new(?) and Mouse and Area is old code. The SP2 SDK does not show XML code (not that I can find) that you see in all the default XML guages from Microsoft.

Hey, MS - can you produce a list of depricated XML codes?

B21,

Yes your digram is what I got to work only using stopwatch code. Since the stopwatch code has no bitmap - I should test a little more deeper with the DG808 guages. Let you know.
 
Thanks Ron - I tried your stopwatch in the DG808S panel (in the locations of both the air speed indicator (top left) and the vario (second row left) and in both cases it gave the same results as my earlier testing, i.e. the mousearea worked as intended in 2D mode, but only works in a narrow crescent-shaped area near the instrument bezel in 3D mode.

To coin a phrase.. WTF? So there must be something the gmax designer can do to the panel geometry to stop mouseareas working?

I'm only adding an instrument to the existing standard DG808S panel - it seems odd that I'd have to delve into gmax and re-build the graphics model of the panel itself...

B21
 
Okay, I have reproduced your "problem" with the real DG808. I also added the variometer to my test panel and get the hand throughout the top half of the guage.

http://www.fsinfotech.com/PublicFiles/Files/misc/vario.jpg

My guess is that the interior mdl file has a bitmap that blocks the mousearea except for the ring just around the outside. The part where the needle moves. So it is not a bug in FS, but by design for the interior mdl file of this particular aircraft - for whatever reason. This has been a learning experience - is all I can say.:confused:

I'll now dive deeper to see how bitmaps play a part in this - may take a while.

My suggestion to you is to "build" a new interior mdl of the aircraft you want and apply the "correct" bitmaps and black holes for the guages.
 
Last edited:
Thanks Ron you've been very helpful. No way do I want to re-model the interior of the FSX DG808S, so I'm making do with a workaround by positioning the two buttons I need right on the bezel of the gauge. By modifying the gauge background bitmap I can make it clear where the mouseareas are even though they're a bit small. Interestingly the bitmap gets distorted near the bezel (I discovered this when I changed it) so there is definitely some kind of a 3D contour there.

So, agreed, it's been a learning experience...

B21
 
I agree they Aces tool is not very nice, but then how long will the "old" code be valid - will it be valid for FS11. Or is the Aces tool not up to date with the latest XML coding scheme.

I also see that MouseArea is new(?) and Mouse and Area is old code. The SP2 SDK does not show XML code (not that I can find) that you see in all the default XML guages from Microsoft.

Hey, MS - can you produce a list of depricated XML codes?

Actually the new tagging layout in FSX XML was implemented to have compatibility with an user friendly editor like ACE.
There is no other change in the heart of the system-appart that a couple of commands now works, and others not- that makes the core routines work different, it's only a schema difference. That's also the reason FSX can handle both formats at no extra cost in terms of performance.

Tom
 
Thanks Tom,

My concern is that - FSX XML code is more strict in some aspects like modeldef.xml (probably due to GAMS export maxscripts) and the ACES tool and SDK doesn't show some of the "old" XML guage code. So where is this system going? Will FS11 have people rewriting guage XML code for a more strict schema, or will the ACES tool be updated to allow existing guage xml code to be used?

Or is this all acedemic and we will need to use Lau scripts with the (my speculation) XML2LAU program.:eek:

I would just like some guidance as to what's in store for the future. I am new to guage development and like to learn from examples. When I view default MS guages, they have code that does not agree with the SDK.

Surely a list of depricated code does not give away any trade secrets. Or if someone in ACES could verify that old XML code will always work in the forseeable future and then update ACES tool to allow that code. Could someone put it on FSINSIDER or their blog. Even guys on TrainSim 2 need to know that, since it's FS on rails ;)
 
Back
Top