implementation in SDLApplication, fix in MouseEvent.cpp

This commit is contained in:
ShaharMS
2022-09-13 13:05:25 +03:00
parent 17e8b1c065
commit 5a18ed4f1a
2 changed files with 7 additions and 1 deletions

View File

@@ -622,6 +622,7 @@ namespace lime {
mouseEvent.button = event->button.button - 1;
mouseEvent.x = event->button.x;
mouseEvent.y = event->button.y;
mouseEvent.clickCount = event->button.clicks;
break;
case SDL_MOUSEBUTTONUP:
@@ -632,6 +633,7 @@ namespace lime {
mouseEvent.button = event->button.button - 1;
mouseEvent.x = event->button.x;
mouseEvent.y = event->button.y;
mouseEvent.clickCount = event->button.clicks;
break;
case SDL_MOUSEWHEEL:

View File

@@ -58,7 +58,11 @@ namespace lime {
if (event->type != MOUSE_WHEEL) {
alloc_field (object, id_button, alloc_int (event->button));
alloc_field (object, id_clickCount, alloc_int (event->clickCount))
}
if (event->type != MOUSE_WHEEL && event->type != MOUSE_MOVE) {
alloc_field (object, id_clickCount, alloc_int (event->clickCount));
}
alloc_field (object, id_movementX, alloc_float (event->movementX));