- Joined
- Jun 6, 2012
- Messages
- 283
- Reaction score
- 65
- Points
- 28
- Location
- Sydney, Australia, Earth, Sol
- Website
- www.orbithangar.com
Hi All,
Firstly, I hope you have all been safe and well during these times, I've busy and away from the Orbiter community for a long while now.
I am working on an new project, and am trying to figure out a problem I have always struggled with; drawing the labels on MFD buttons in a VC. I am currently just working on a very simple ShuttlePB testbed vessel (to overcome this) so what I have in clbkLoadVC is minimal, and adapted from the ShuttleA source code:
Again, it is extremely simple, as I just want to overcome and understand this issue (anyone who played with my earlier ISV Pegasus addon may remember the lack of MFD button labels).
I thought it may have something to do with flagging the meshgroup as D (dynamic), but alas this seems to make no difference.
If anyone could offer any advice I would greatly appreciate it.
Thank you in advance,
MrMartian
Firstly, I hope you have all been safe and well during these times, I've busy and away from the Orbiter community for a long while now.
I am working on an new project, and am trying to figure out a problem I have always struggled with; drawing the labels on MFD buttons in a VC. I am currently just working on a very simple ShuttlePB testbed vessel (to overcome this) so what I have in clbkLoadVC is minimal, and adapted from the ShuttleA source code:
bool ShuttlePB::clbkLoadVC (int id)
{
static VCMFDSPEC mfds_left = {1, 1};
SetCameraDefaultDirection (_V(0,0,1)); // forward
switch (id) {
case 0: // pilot
SetCameraOffset (_V(0,0.3638965,1.717594));
SetCameraShiftRange (_V(0,0,0.1), _V(-0.2,0,0), _V(0.2,0,0));
oapiVCRegisterMFD (MFD_LEFT, &mfds_left);
SURFHANDLE tex1 = oapiGetTextureHandle (mh_vc,1); //engine thrust tex
// MFD1 buttons
tex1 = oapiGetTextureHandle (mh_vc,1); //mfd buttons tex
oapiVCRegisterArea (AID_MFD1_LBUTTONS, _R( 8 ,9, 32,218), PANEL_REDRAW_MOUSE|PANEL_REDRAW_USER,PANEL_MOUSE_LBDOWN|PANEL_MOUSE_LBUP|PANEL_MOUSE_LBPRESSED|PANEL_MOUSE_ONREPLAY, PANEL_MAP_BACKGROUND, tex1);
oapiVCSetAreaClickmode_Quadrilateral(AID_MFD1_LBUTTONS,
_V(-0.2762892, -8.237985E-02, -2.788238E-02+2.7),
_V(-0.3193802, -8.237985E-02, -2.788238E-02+2.7),
_V(-0.2762892, -0.122936, -2.788238E-02+2.7),
_V(-0.3193802, -0.122936, -2.788238E-02+2.7));
break;
}
return true;
}
Again, it is extremely simple, as I just want to overcome and understand this issue (anyone who played with my earlier ISV Pegasus addon may remember the lack of MFD button labels).
I thought it may have something to do with flagging the meshgroup as D (dynamic), but alas this seems to make no difference.
If anyone could offer any advice I would greatly appreciate it.
Thank you in advance,
MrMartian