| 135 | } |
| 136 | |
| 137 | static void mouseWheelCallback(GLFWwindow* pGlfwWindow, double scrollX, double scrollY) |
| 138 | { |
| 139 | Window* pWindow = (Window*)glfwGetWindowUserPointer(pGlfwWindow); |
| 140 | if (pWindow != nullptr) |
| 141 | { |
| 142 | MouseEvent event; |
| 143 | event.type = MouseEvent::Type::Wheel; |
| 144 | double x, y; |
| 145 | glfwGetCursorPos(pGlfwWindow, &x, &y); |
| 146 | event.pos = calcMousePos(x, y, pWindow->getMouseScale()); |
| 147 | event.wheelDelta = (float2(float(scrollX), float(scrollY))); |
| 148 | |
| 149 | pWindow->mpCallbacks->handleMouseEvent(event); |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | static void errorCallback(int errorCode, const char* pDescription) |
| 154 | { |
nothing calls this directly
no test coverage detected