Called when a mouse button event occurs
| 658 | |
| 659 | // Called when a mouse button event occurs |
| 660 | bool SceneDemo::mouseButtonEvent(int button, bool down, int mods, double mousePosX, double mousePosY) { |
| 661 | |
| 662 | // Left mouse click with CTRL key pressed on keyboard (moving a body) |
| 663 | if (down && (mods & GLFW_MOD_CONTROL)) { |
| 664 | |
| 665 | moveBodyWithMouse(mousePosX, mousePosY); |
| 666 | return true; |
| 667 | } |
| 668 | |
| 669 | mIsMovingBody = false; |
| 670 | mMovingBody = nullptr; |
| 671 | |
| 672 | return Scene::mouseButtonEvent(button, down, mods, mousePosX, mousePosY); |
| 673 | } |
| 674 | |
| 675 | // Called when a mouse motion event occurs |
| 676 | bool SceneDemo::mouseMotionEvent(double xMouse, double yMouse, int leftButtonState, int rightButtonState, int middleButtonState, int altKeyState) { |
nothing calls this directly
no outgoing calls
no test coverage detected