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

XML beginner question

Messages
533
Country
france
Hello,
I am a beginner in XML, and I wrote the simplest possible XML gauge to test the transparency on a rectangle, using fs9. Here is my code:

Code:
<Gauge Name="Rectangle 1" Version="1.0">
  <Image Name="Bckgrd10.bmp"/>
  <Element>
     <Position X="0" Y="0"/>
     <Visible>1</Visible>
     <Rectangle Width="5" Height="5" FillColor="#FF0000" Bright="Yes" Transparency="0.75"/>
  </Element>
</Gauge>
Bckgrd10.bmp is a full-black image of 10 by 10 pixels. The rectangle size is 5 by 5 so that it should take half of the gauge size in width and height.
Everything works except the position of the rectangle !! Even by setting the position to 0,0, it is not positioned on the top left corner of the gauge.

If I set the gauge position at 0,0 in the panel like this:
Code:
gauge03=XMLTest!Rect1, 0,0,100,100
the rectangle is not displayed on the top left corner of the panel. There is a small offset.

Can someone explain me this?
Any help is welcome.

Eric
 
Couple of questions!

Hi,

Is this for 2D or VC?
Is the UVW map/Gizmo in gmax the right size?

Where is the info for the [Window00] information ?

There are more dementions for that Window!
Could be that!

Is the BMP, the same as what your stating?

Where is the gauge showing up? Off by alot?
or a little?

DG,:)
 
Eric, I created the same XML scripted "gauge" and it works just as expected here...

...of course, with a fully transparent background it's a bit tough to see anything at all. After changing to a background of 1,1,1 I could more easily see the red semi-transparent 5,5 square.
 
The gauge is in the 2D panel only, adn the panel is the simplest possible panel, here it is:
Code:
[window titles]
window00=main panel

[window00]
Background_color=0,0,0 
size_mm=640,480
position=0
visible=1
ident=main_PANEL

gauge00=XMLTest!Rect1, 0,0,100,100

[Default View]
X=0
Y=0
SIZE_X=8192
SIZE_Y=3000

[Views]
VIEW_FORWARD_DIR= 3.0, 0.0, 0.0

[Color]
Day=255,255,255
Night=255,255,255
Luminous=255,255,255

I made another test by changing the black background into a green one, so that it is not transparent any more. Here is what I get:
XML1.jpg

It shows the gauge is correctly positioned at 0,0 in the top left corner. But the semi-transparent rectangle does not appear at the right position. Strange, isn't it?

Bill, I'm surprised it works fine for you, it certainly means I have to look somewehre else...

Thanks for your help !!
Eric
 
Eric, the only difference is that I tested your XML "gauge" in FSX, although that should make absolutely no difference whatever...:twocents:
 
I think it makes a difference, which means there would be a bug in fs9 on this specific feature. Changing the background size to 100 by 100 pixels (instead of 10 by 10) solved the problem in fs9.

Anyway, this is not important any more because I finally found the best way to do what I wanted to do: reuse the ATC-like semi-transparent window provided in FS, see image attached.

Transparency.jpg
 
Back
Top