| 575 | } |
| 576 | |
| 577 | bool 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 | |
| 592 | void Gui::onMouseButtonEvent(int button, int action, int modifiers) { |
| 593 | mScreen->mouse_button_callback_event(button, action, modifiers); |