//================================================================================ void ATHInputManager::SendMouseEvent() { ATHKeyList m_liButtonsDown = CheckMouseButtons(); ATHKeyList::iterator itrCurr = m_liButtonsDown.begin(); ATHKeyList::iterator itrEnd = m_liButtonsDown.end(); ATHEvent mouseEvent( AET_MOUSE ); unsigned int unButtonDownIndex = 0; while( itrCurr != itrEnd ) { char szButton; if( MouseButtonPressed( szButton = (*itrCurr ) ) && unButtonDownIndex < 8 ) { mouseEvent.MSE_szMouseButtonsDown[ unButtonDownIndex ] = szButton; unButtonDownIndex++; } itrCurr++; } if( unButtonDownIndex > 0 ) { mouseEvent.MSE_unPosX = m_fMouseX; mouseEvent.MSE_unPosY = m_fMouseY; mouseEvent.m_EventID = AEI_MOUSEDOWN; m_pEventManager->SendEvent( mouseEvent, AEP_IMMEDIATE ); } }
// A button on the mouse was pressed. void GraphicsWindow::OnMouseButtonPressed( MouseButtonEventArgs& e ) { MouseButtonPressed( e ); }