MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / mouse_button_event

Method mouse_button_event

testbed/src/TestbedApplication.cpp:638–649  ·  view source on GitHub ↗

Handle a mouse button event (default implementation: propagate to children)

Source from the content-addressed store, hash-verified

636
637// Handle a mouse button event (default implementation: propagate to children)
638void 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)
652void TestbedApplication::mouse_motion_event(double x, double y) {

Callers 1

startMethod · 0.80

Calls 2

onMouseButtonEventMethod · 0.80
mouseButtonEventMethod · 0.45

Tested by

no test coverage detected