JMW
Aspiring Addon Developer
Hi All,
I have a little problem that can't solve myself.........
In an autopilot, I select a base to land at via
This "*bstr" is changed by "Base = bstr; " and printed to HUD in:
But then, if I use Terminal MFD, as soon as the "Input" box is opened, the "Base" data inputted previously disappears and any imputed data is printed instead in HUD. (It does not interfere with the operation of the autopilot though)
How can I get the print of the string entered in my Input box to be protected?
I have a little problem that can't solve myself.........
In an autopilot, I select a base to land at via
Code:
case OAPI_KEY_M: // Base Box
{
HUD2 = 1;
oapiSetHUDMode (HUD_DOCKING);
oapiOpenInputBox("Enter Base Name", InputTarget, 0, 15, (void*)this) ;
return true;
}
Code:
bool InputTarget(void *id, char *bstr, void *user_data)
This "*bstr" is changed by "Base = bstr; " and printed to HUD in:
Code:
bool ShuttlePB::clbkDrawHUD (int mode, const HUDPAINTSPEC *hps, oapi::Sketchpad *skp)
Code:
Base = _strupr(Base);
len = sprintf_s(buffer,"%s",Base);
skp->SetTextColor(0x00ff00);
skp->Text(0, 170, buffer, len);
len = sprintf_s(buffer,"Pad:%02.02d",padNum);
skp->Text(46, 160, buffer, len);
Base = _strlwr(Base);
But then, if I use Terminal MFD, as soon as the "Input" box is opened, the "Base" data inputted previously disappears and any imputed data is printed instead in HUD. (It does not interfere with the operation of the autopilot though)
How can I get the print of the string entered in my Input box to be protected?