DragonflightDesign
Resource contributor
- Messages
- 1,235
- Country
I've been working with the WASM Demo Gauge (GaugeAircraft in the SDK) as a starter into the world of programming MSFS with C++, but one thing beats me. Where is the size of the on-screen gauge specified? If we look at a panel.cfg entry:
then AFAICS the position of the individual gauge is probably specified by $SCREEN_1. I would guess that this is defined in the aircraft VC? Changing the size parameters in the panel.cfg has no effect on the size of the gauge, but the code contains the following (example) line:-
So winWidth and winHeight are being defined somewhere but where?
-Dai
Code:
[VCockpit01]
size_mm=1024,768
pixel_size=1024,768
texture=$SCREEN_1
background_color=0,0,255
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=WASM_Demo_Gauge.wasm&wasm_gauge=Compass, 0,0,1024,768
Code:
nvgTranslate(nvgctx, p_draw_data->winWidth * 0.5f - 200, p_draw_data->winHeight * 0.5f);
-Dai