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

2D gauge placement (help)

Messages
917
Country
indonesia
due to 2D gauge are re-sizeable and movable,
need help 2 things:
1. is there any "trick" to make 2D gauge always at center of screen, no mater what screen size used?
2. how to maintain 2D gauge aspect ratio in different screen aspect ratio?

for starting, in panel.cfg
Code:
[Window00]               
size_mm=512,512
window_size= 0.54,1
window_pos= 0.225,0.025
position=1
VISIBLE=1
ident=HUD
gauge00=Mar_MV22B!mar_HUD, 0,0,512,512

it can center when use HD screen (1920x1080px), but will move slightly left when use TV monitor (1360x768px)
 
Messages
917
Country
indonesia
thanks will learning that, I can made gauge "center" but I have another issue. gauge reading screen resolution seem not right so gauge never won't centered
 
Messages
917
Country
indonesia
this what happen
2017-10-8_21-32-27-634.jpg


Code:
[Window00]               
size_mm=512,512
window_size=0.565,1
position=8
alpha_blend=0.4
VISIBLE=1
ident=HUD
//windowsize_ratio=0.565

gauge00=Mar_MV22B!mar_HUD, 0,0,512,512

surely my gauge size is 512x512px set in C++ and panel.cfg
I don't know why I have extra transparent gauge. see white line, when select a 2D gauge white line will appear and reveal real gauge size. any idea?
 

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
Actually, if you want to do a proper helmet mounted sight, you need to do it in the 3D model and use VRS TACPACK. Then you can have it conform to the outside world. Not all that hard.
 
Messages
917
Country
indonesia
I believe you can do that, no doubt.
something I should concern is:
1. pilot asking this 2D panel, intended to be use in external model, to help them landing in spot. some pilot like to see aircraft "landing in action" real time from outside view. making 3D gauge, in my understanding is it for VC, am I right?
2. with the need of TACPACK, make HUD feature are limited to be use. only TACPACK user can use it, it seem not fair for freeware pilot.
 

Luka

Resource contributor
Messages
212
Country
serbia
Try these settings. Also, it might be better to use another 'WindowXX' instead of 'Window00'.

Code:
[Window02]             
size_mm=512,512
pixel_size=512,512
position=4
type=special
Render_3d_window=1 //this prevents movement of "type=special" panels around the screen
BACKGROUND_COLOR=0,0,0
VISIBLE=0
ident=HUD
gauge00=Mar_MV22B!mar_HUD, 0,0,512,512
 
Messages
917
Country
indonesia
Thanks, I tried it
this code make HUD gauge hidden
Code:
Render_3d_window=1


this the best position I can do
Code:
[Window00]            
size_mm=512,512
pixel_size=512,512
window_pos= 0.95, 0.5
position=4
alpha_blend=0.4
visible=1
Type=SPECIAL
windowsize_ratio=0.565

gauge00=Mar_MV22B!mar_HUD, 0,0, 512, 512

this not solved, but this the close one.

2017-10-9_13-31-45-695.jpg
 
Last edited:

ddawson

Resource contributor
Messages
862
Country
canada
In the PANEL_SERVICE_CONNECT_TO_WINDOW case, you can override the position of the gauge that is specified in panel.cfg.
For instance, my test case:
Code:
//--------------------------------------------------------
[Window02]
Background_color=2,2,2
size_mm=256,136
window_size_ratio=1.000  
position=0
visible=0
ident=22
window_size= 0.300, 0.188
window_pos= 0.020, 0.500
zorder=0
gauge00=TestGauge_x64!gauge_2, 0,0,200

In the gauge code:
case PANEL_SERVICE_CONNECT_TO_WINDOW:
   pgauge->position.x = 100;
   pgauge->position.y = 30;
break;
The gauge appears at 100,30, rather than at 0,0 on the window specified. By checking the size of the main FS window, you should be able to determine where you need to place the gauge.

Doug
 
Top