- Joined
- Nov 12, 2011
- Messages
- 17
- Reaction score
- 0
- Points
- 0
- Location
- Catania
- Website
- orbiteritalia.forumotion.com
Hi guys i need an help or hint with my MFD Button on VC. I don't understand how to make this work on my dll
I have declared this on my .h file
Difference beetwen first and all the other buttons is just a test to see if i need the offset that also the VC camera has (both not working)
in my cpp i have this
I don't understand what i must declare in
thanks to anyone that want to share with me the solution of the problem
I have declared this on my .h file
Code:
//identificatore tasti
#define AID_PWR 0001 // MFD 'Power' button
#define AID_SEL 0002 // MFD 'Select' button
#define AID_MNU 0003 // MFD 'Menu' button
// MFD buttons (relative to MFD)
const VECTOR3 MFD_BUTTON_POS[3] = {
{0.236,0.595,6.4}, { 0.236,0.795,9.8}, { 0.236,0.995,9.8} };
Difference beetwen first and all the other buttons is just a test to see if i need the offset that also the VC camera has (both not working)
in my cpp i have this
Code:
bool Altairsm::clbkLoadVC(int id)
{
VECTOR3 MFD_buttons[3];
.....
.....
switch (id) {
case 0: // pilota
oapiVCRegisterMFD(MFD_RIGHT, &mfd);
oapiVCRegisterMFD(MFD_LEFT, &mfd2);
oapiVCRegisterArea(AID_PWR, _R(0, 0, 0, 0), PANEL_REDRAW_NEVER, PANEL_MOUSE_LBDOWN, PANEL_MAP_NONE, NULL);
oapiVCSetAreaClickmode_Spherical(AID_PWR, MFD_buttons[1], 0.01);
oapiVCRegisterArea(AID_SEL, _R(0, 0, 0, 0), PANEL_REDRAW_NEVER, PANEL_MOUSE_LBDOWN, PANEL_MAP_NONE, NULL);
oapiVCSetAreaClickmode_Spherical(AID_SEL, MFD_buttons[2], 0.01);
oapiVCRegisterArea(AID_MNU, _R(0, 0, 0, 0), PANEL_REDRAW_NEVER, PANEL_MOUSE_LBDOWN, PANEL_MAP_NONE, NULL);
oapiVCSetAreaClickmode_Spherical(AID_MNU, MFD_buttons[3], 0.01);
...
I don't understand what i must declare in
Code:
void Altairsm::RegisterActiveAreas(VECTOR3 ofs)
{
}
bool Altairsm::clbkVCMouseEvent(int id, int event, VECTOR3 &p)
{
switch (id) {
case AID_SEL: {
oapiSendMFDKey(MFD_LEFT, OAPI_KEY_F2);
}return true;
case AID_PWR: {
oapiSendMFDKey(MFD_LEFT, OAPI_KEY_ESCAPE);
}
}
return true;
}
bool Altairsm::clbkVCRedrawEvent(int id, int event, SURFHANDLE surf)
{
return false;
}
thanks to anyone that want to share with me the solution of the problem
Last edited: