//----------------------------------------------------------------------------- // mouse dragged void GuiTestAll::appMouseDrag( int dx, int dy, int flags) { if (m_deskMode) { // neither button down, so move cursor mgDisplay->cursorMove(dx, dy); int x, y; mgDisplay->getCursorPosn(x, y); // if ui wants mouse events, send it if (m_ui != NULL && m_ui->hasMouseFocus()) { m_ui->m_top->surfaceMouseDrag(x, y, flags); return; } // if either button down (or both) if ((flags & BOTH_BUTTONS) != 0) turnEye(dx, dy); } else appMouseMove(dx, dy, flags); }
//----------------------------------------------------------------------------- // mouse dragged void SeaOfMemes::appMouseDrag( int dx, int dy, int flags) { if (m_deskMode) { // if either button down (or both) if ((flags & BOTH_BUTTONS) != 0) m_world->turnEye(-dy/25.0, -dx/25.0); } else appMouseMove(dx, dy, flags); }
//----------------------------------------------------------------------------- // mouse dragged void DontHitMe::appMouseDrag( int dx, int dy, int flags) { if (m_deskMode) { // if either button down (or both) if ((flags & BOTH_BUTTONS) != 0) { turnEye(dx, dy); } } else appMouseMove(dx, dy, flags); }
//----------------------------------------------------------------------------- // mouse dragged void MovementApp::appMouseDrag( int dx, int dy, int flags) { if (m_deskMode) { int x, y; mgDisplay->getCursorPosn(x, y); // if ui wants mouse events, send it if (m_ui != NULL && (m_ui->hasMouseFocus() || m_ui->usesMousePoint(x, y))) { m_ui->getTop()->surfaceMouseDrag(x, y, flags); return; } // if either button down (or both) if ((flags & BOTH_BUTTONS) != 0) turnEye(dx, dy); } else appMouseMove(dx, dy, flags); }
//----------------------------------------------------------------------------- // mouse dragged void SeaOfMemes::appMouseDrag( int dx, int dy, int flags) { if (m_deskMode) { mgDisplay->cursorMove(dx, dy); int x, y; mgDisplay->getCursorPosn(x, y); // if ui wants mouse events, send it if (m_helpUI != NULL && m_helpUI->hasMouseFocus()) { m_helpUI->getTop()->surfaceMouseDrag(x, y, flags); return; } // if either button down (or both) if ((flags & BOTH_BUTTONS) != 0) m_world->turnEye(-dy/25.0, -dx/25.0); } else appMouseMove(dx, dy, flags); }