I have a vessel2 vessel that is converted to Vessel3. But this doesn't work anymore. The info is not shown on the HUD. Didn't find anything in the API reference
h:
cpp:
h:
Code:
void HUD_Text(const HUDPAINTSPEC* pHPS, HDC hdc);
Code:
void xyz::HUD_Text(const HUDPAINTSPEC* pHPS, HDC hdc)
{
char cbuf[128];
// char cbuf2[128];
int tx, ty, ty2, yoff, ty3, ty4, ty5;
//double apd;
GetTextMetrics(hdc, &tm);
yoff = tm.tmHeight;
tx = tm.tmAveCharWidth;
ty4 = 15 * yoff;
ty3 = 13 * yoff;
ty = 15 * yoff;
ty2 = 11 * yoff;
ty5 = 12 * yoff;
//Rectangle (hdc, tx-2, ty-1, tx+120,ty+(yoff*7));
SetTextColor(hdc, colRed);
sprintf(cbuf, "PAD A: ");
TextOut(hdc, (tx), (ty2 + (yoff * 1)) + 3, cbuf, strlen(cbuf));
if (GetAttachmentStatus(PaD1)){
oapiGetObjectName(GetAttachmentStatus(PaD1), cbuf, 100);
}
else{
sprintf(cbuf, " -----");
}
TextOut(hdc, (tx + 65), (ty2 + (yoff * 1)) + 3, cbuf, strlen(cbuf));
sprintf(cbuf, "PAD B: ");
TextOut(hdc, (tx), (ty2 + (yoff * 2)) + 3, cbuf, strlen(cbuf));
if (GetAttachmentStatus(PaD2)){
oapiGetObjectName(GetAttachmentStatus(PaD2), cbuf, 100);
}
else{
sprintf(cbuf, " -----");
}
TextOut(hdc, (tx + 65), (ty2 + (yoff * 2)) + 3, cbuf, strlen(cbuf));
sprintf(cbuf, "PAD C: ");
TextOut(hdc, (tx), (ty2 + (yoff * 3)) + 3, cbuf, strlen(cbuf));
if (GetAttachmentStatus(PaD3)){
oapiGetObjectName(GetAttachmentStatus(PaD3), cbuf, 100);
}
else{
sprintf(cbuf, " -----");
}
TextOut(hdc, (tx + 65), (ty2 + (yoff * 3)) + 3, cbuf, strlen(cbuf));
}
Last edited: