I know it was anserwed, but i tried to compile custom.mfd i get this
There is no windows.h in the include folder in the orbiter sdk :sos:
And here is my changes to ascent profile.mfd
Martin said i need to code them myself to show US units but i cant compile
Code:
------ Build started: Project: CustomMFD, Configuration: Debug Win32 ------
Compiling...
CustomMFD.cpp
...\desktop\orbitersdk\samples\custommfd\orbiterapi.h(18) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
Build log was saved at "...Desktop\Orbitersdk\samples\CustomMFD\Debug\BuildLog.htm"
CustomMFD - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
And here is my changes to ascent profile.mfd
Code:
switch (key) {
case OAPI_KEY_A:
oapiOpenInputBox ("Altitude range (mi) [min max, or 'a' for auto]:", AltInput, 0, 20, (void*)this);
return true;
case OAPI_KEY_P:
page = (page+1) % 2;
return true;
case OAPI_KEY_R:
oapiOpenInputBox ("Vrad range (mi/h) [min max, or 'a' for auto]:", VradInput, 0, 20, (void*)this);
return true;
case OAPI_KEY_T:
oapiOpenInputBox ("Vtan range (mi/h) [min max, or 'a' for auto]:", VtanInput, 0, 20, (void*)this);
return true;
}
return false;
}
bool AscentMFD::ConsumeButton (int bt, int event)
{
if (!(event & PANEL_MOUSE_LBDOWN)) return false;
static const DWORD btkey[4] = { OAPI_KEY_P, OAPI_KEY_A, OAPI_KEY_R, OAPI_KEY_T };
if (bt < 4) return ConsumeKeyBuffered (btkey[bt]);
else return false;
}
char *AscentMFD::ButtonLabel (int bt)
{
char *label[4] = {"PG", "AR", "VRR", "VTR"};
return (bt < 4 ? label[bt] : 0);
}
int AscentMFD::ButtonMenu (const MFDBUTTONMENU **menu) const
{
static const MFDBUTTONMENU mnu[4] = {
{"Select page", 0, 'P'},
{"Altitude range", 0, 'A'},
{"Radial", "velocity range", 'R'},
{"Tangential", "velocity range", 'T'}
};
if (menu) *menu = mnu;
return 4;