Skip to content

Commit

Permalink
framebuffer: ignore mouse move event when nothing is pressed.
Browse files Browse the repository at this point in the history
I switched GLUT for SDL2 and didn't bother to test, apparently.
  • Loading branch information
mosra committed Jun 29, 2014
1 parent 4534f99 commit 61bbd91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/framebuffer/FramebufferExample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ void FramebufferExample::mousePressEvent(MouseEvent& event) {
}

void FramebufferExample::mouseMoveEvent(MouseMoveEvent& event) {
if(!event.buttons()) return;

billboard->translate(camera->projectionSize()*Vector2(event.position()-previous)/Vector2(camera->viewport())*Vector2(2.0f, -2.0f));
previous = event.position();
redraw();
Expand Down

0 comments on commit 61bbd91

Please sign in to comment.