fix an oversight when setting clickCount

for some reason I'm assigning clickCount after dispatching the event. that means we're always one click behind.
This commit is contained in:
Shahar Marcus
2022-10-01 12:57:00 +03:00
committed by GitHub
parent 361d71d06d
commit 56f7a42992

View File

@@ -335,12 +335,13 @@ class NativeApplication
switch (mouseEventInfo.type)
{
case MOUSE_DOWN:
window.onMouseDown.dispatch(mouseEventInfo.x, mouseEventInfo.y, mouseEventInfo.button);
window.clickCount = mouseEventInfo.clickCount;
window.onMouseDown.dispatch(mouseEventInfo.x, mouseEventInfo.y, mouseEventInfo.button);
case MOUSE_UP:
window.onMouseUp.dispatch(mouseEventInfo.x, mouseEventInfo.y, mouseEventInfo.button);
window.clickCount = mouseEventInfo.clickCount;
window.onMouseUp.dispatch(mouseEventInfo.x, mouseEventInfo.y, mouseEventInfo.button);
case MOUSE_MOVE:
window.onMouseMove.dispatch(mouseEventInfo.x, mouseEventInfo.y);