MCPcopy Create free account
hub / github.com/axmolengine/axmol / onGLFWMouseScrollCallback

Method onGLFWMouseScrollCallback

core/platform/RenderViewImpl.cpp:1236–1244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1234#endif
1235
1236void RenderViewImpl::onGLFWMouseScrollCallback(GLFWwindow* window, double x, double y)
1237{
1238 EventMouse event(EventMouse::MouseEventType::MOUSE_SCROLL);
1239 float cursorX = transformInputX(_mouseX);
1240 float cursorY = transformInputY(_mouseY);
1241 event.setScrollData((float)x, -(float)y);
1242 event.setMouseInfo(cursorX, cursorY, checkMouseButton(window));
1243 Director::getInstance()->getEventDispatcher()->dispatchEvent(&event);
1244}
1245
1246void RenderViewImpl::onGLFWKeyCallback(GLFWwindow* /*window*/, int key, int /*scancode*/, int action, int /*mods*/)
1247{

Callers 1

Calls 4

transformInputYFunction · 0.85
getInstanceFunction · 0.85
checkMouseButtonFunction · 0.70
dispatchEventMethod · 0.45

Tested by

no test coverage detected