Mouse buttons 4 and 5 now work to navigate steps.

This commit is contained in:
leo 2015-09-06 19:52:17 +00:00
parent df28f02b82
commit 55f87378cd
4 changed files with 38 additions and 0 deletions

View file

@ -82,6 +82,10 @@ public:
virtual void OnMiddleButtonUp() { }
virtual void OnRightButtonDown() { }
virtual void OnRightButtonUp() { }
virtual void OnBackButtonDown() { }
virtual void OnBackButtonUp() { }
virtual void OnForwardButtonDown() { }
virtual void OnForwardButtonUp() { }
virtual void OnMouseMove() { }
virtual void OnMouseWheel(float Direction) { }

View file

@ -2366,6 +2366,16 @@ void View::OnRightButtonUp()
StopTracking(mTrackButton == LC_TRACKBUTTON_RIGHT);
}
void View::OnBackButtonUp()
{
gMainWindow->HandleCommand(LC_VIEW_TIME_PREVIOUS);
}
void View::OnForwardButtonUp()
{
gMainWindow->HandleCommand(LC_VIEW_TIME_NEXT);
}
void View::OnMouseMove()
{
if (mTrackButton == LC_TRACKBUTTON_NONE)

View file

@ -72,6 +72,8 @@ public:
void OnMiddleButtonUp();
void OnRightButtonDown();
void OnRightButtonUp();
void OnBackButtonUp();
void OnForwardButtonUp();
void OnMouseMove();
void OnMouseWheel(float Direction);

View file

@ -229,12 +229,23 @@ void lcQGLWidget::mousePressEvent(QMouseEvent *event)
case Qt::LeftButton:
widget->OnLeftButtonDown();
break;
case Qt::MidButton:
widget->OnMiddleButtonDown();
break;
case Qt::RightButton:
widget->OnRightButtonDown();
break;
case Qt::BackButton:
widget->OnBackButtonDown();
break;
case Qt::ForwardButton:
widget->OnForwardButtonDown();
break;
default:
break;
}
@ -255,12 +266,23 @@ void lcQGLWidget::mouseReleaseEvent(QMouseEvent *event)
case Qt::LeftButton:
widget->OnLeftButtonUp();
break;
case Qt::MidButton:
widget->OnMiddleButtonUp();
break;
case Qt::RightButton:
widget->OnRightButtonUp();
break;
case Qt::BackButton:
widget->OnBackButtonUp();
break;
case Qt::ForwardButton:
widget->OnForwardButtonUp();
break;
default:
break;
}