Handle a mouse button event (default implementation: propagate to children)
| 636 | |
| 637 | // Handle a mouse button event (default implementation: propagate to children) |
| 638 | void TestbedApplication::mouse_button_event(int button, int action, int modifiers) { |
| 639 | |
| 640 | mGui.onMouseButtonEvent(button, action, modifiers); |
| 641 | |
| 642 | // Get the mouse cursor position |
| 643 | double x, y; |
| 644 | glfwGetCursorPos(mWindow, &x, &y); |
| 645 | |
| 646 | bool down = action == GLFW_PRESS; |
| 647 | |
| 648 | mCurrentScene->mouseButtonEvent(button, down, modifiers, x, y); |
| 649 | } |
| 650 | |
| 651 | // Handle a mouse motion event (default implementation: propagate to children) |
| 652 | void TestbedApplication::mouse_motion_event(double x, double y) { |
no test coverage detected