Browse Source

Fix for ScrollWidget middle click

tags/v0.4.0
Andrew Belt 7 years ago
parent
commit
8db7444659
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/widgets/ScrollWidget.cpp

+ 3
- 3
src/widgets/ScrollWidget.cpp View File

@@ -36,13 +36,13 @@ void ScrollWidget::step() {
}

Widget *ScrollWidget::onMouseMove(Vec pos, Vec mouseRel) {
Widget *w = Widget::onMouseMove(pos, mouseRel);
if (w) return w;

if (glfwGetMouseButton(gWindow, GLFW_MOUSE_BUTTON_MIDDLE) == GLFW_PRESS) {
offset = offset.minus(mouseRel);
return this;
}

Widget *w = Widget::onMouseMove(pos, mouseRel);
if (w) return w;
return NULL;
}



Loading…
Cancel
Save