It's not possible to change the name of the MFD buttons real-time, is it?
This is why we see something like
in IMFD for example: a workaround.
For what I guess, the function char *MFD::ButtonLabel (int bt) is called by Orbiter only when the MFD it's loaded.
Indeed I tried something like this:
and it works only if I change the variable "changeButton" at the constructor of the MFD class, so it's useless.
So my question is: why this is not allowed by the SDK?
If there isn't any particular reason I do a request for it ^^
Thanks for reading.
This is why we see something like
Code:
Prv <
Nxt <
+ <
- <
For what I guess, the function char *MFD::ButtonLabel (int bt) is called by Orbiter only when the MFD it's loaded.
Indeed I tried something like this:
Code:
// Return button labels
char *MFD::ButtonLabel (int bt)
{
// The labels for the buttons used by our MFD mode
char *label[NButtons] = { //not "static char" but just "char"
"B1","B2","B3","B4","B5","B6","B7","B8","B9"
};
if(changeButton) //an example boolean variable
strcpy(label[0],"New"); //this changes the button
return (bt < NButtons ? label[bt] : 0);
}
So my question is: why this is not allowed by the SDK?
If there isn't any particular reason I do a request for it ^^
Thanks for reading.
Last edited: