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

Method onScrollEvent

testbed/src/Gui.cpp:577–590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575}
576
577bool Gui::onScrollEvent(double x, double y) {
578
579 double xMouse, yMouse;
580 glfwGetCursorPos(mWindow, &xMouse, &yMouse);
581
582 // If the mouse cursor is over the scenes choice scrolling menu
583 const float pixelRatio = mScreen->pixel_ratio();
584 if (mComboBoxScenes->popup()->visible() && mComboBoxScenes->popup()->contains(Vector2i(xMouse, yMouse) / pixelRatio)) {
585 mScreen->scroll_callback_event(x, y);
586 return true;
587 }
588
589 return false;
590}
591
592void Gui::onMouseButtonEvent(int button, int action, int modifiers) {
593 mScreen->mouse_button_callback_event(button, action, modifiers);

Callers 1

scroll_eventMethod · 0.80

Calls 1

containsMethod · 0.45

Tested by 1

scroll_eventMethod · 0.64