bool FuelMFD::ConsumeButton (int bt, int event) { if (!(event & PANEL_MOUSE_LBDOWN)) return false; static const DWORD btkey[3] = { OAPI_KEY_P, OAPI_KEY_N, OAPI_KEY_M }; if (bt < 3) return ConsumeKeyBuffered (btkey[bt]); else return false; }
bool UNVPAMFD::ConsumeButton (int bt, int event) { if (!(event & PANEL_MOUSE_LBDOWN)) return false; switch(bt) { case 0: return ConsumeKeyBuffered(OAPI_KEY_RBRACKET); case 1: return ConsumeKeyBuffered(OAPI_KEY_LBRACKET); case 2: return ConsumeKeyBuffered(OAPI_KEY_J); case 3: return ConsumeKeyBuffered(OAPI_KEY_F); } return false; }
bool AscentApMfd::ConsumeButton (int bt, int event) { if (!bt) { if (event & PANEL_MOUSE_LBDOWN) { DWORD btkey = (ap->Active() ? OAPI_KEY_D : ap->GetVessel()->status == 0 ? OAPI_KEY_L : OAPI_KEY_E); return ConsumeKeyBuffered (btkey); } } if (bt < 3) { if (event & PANEL_MOUSE_LBDOWN) { static const DWORD btkey[2] = {OAPI_KEY_COMMA, OAPI_KEY_PERIOD}; return ConsumeKeyBuffered (btkey[bt-1]); } } if (bt < 7 && cpg == 0 && !ap->Active() && ap->GetVessel()->status == 0) { static const DWORD btkey[4] = {OAPI_KEY_SEMICOLON, OAPI_KEY_APOSTROPHE, OAPI_KEY_MINUS, OAPI_KEY_EQUALS}; if (event & PANEL_MOUSE_LBDOWN) { return ConsumeKeyBuffered(btkey[bt-3]); } else if (event & PANEL_MOUSE_LBUP) { if (set_mode != MODE_NONE) { set_mode = MODE_NONE; return true; } } else if (event & PANEL_MOUSE_LBPRESSED) { switch(bt-3) { case 0: DecAzimuth(); return true; case 1: IncAzimuth(); return true; case 2: DecAltitude(); return true; case 3: IncAltitude(); return true; } } } return false; }