added clickCount to MouseEvent files

This commit is contained in:
ShaharMS
2022-09-13 12:52:40 +03:00
parent f9827cf47e
commit 17e8b1c065
2 changed files with 6 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ namespace lime {
int windowID; int windowID;
double x; double x;
double y; double y;
int clickCount;
static ValuePointer* callback; static ValuePointer* callback;
static ValuePointer* eventObject; static ValuePointer* eventObject;

View File

@@ -15,6 +15,7 @@ namespace lime {
static int id_windowID; static int id_windowID;
static int id_x; static int id_x;
static int id_y; static int id_y;
static int id_clickCount;
static bool init = false; static bool init = false;
@@ -27,6 +28,7 @@ namespace lime {
y = 0.0; y = 0.0;
movementX = 0.0; movementX = 0.0;
movementY = 0.0; movementY = 0.0;
clickCount = 0;
} }
@@ -46,6 +48,7 @@ namespace lime {
id_windowID = val_id ("windowID"); id_windowID = val_id ("windowID");
id_x = val_id ("x"); id_x = val_id ("x");
id_y = val_id ("y"); id_y = val_id ("y");
id_clickCount = val_id ("clickCount");
init = true; init = true;
} }
@@ -55,7 +58,7 @@ namespace lime {
if (event->type != MOUSE_WHEEL) { if (event->type != MOUSE_WHEEL) {
alloc_field (object, id_button, alloc_int (event->button)); alloc_field (object, id_button, alloc_int (event->button));
alloc_field (object, id_clickCount, alloc_int (event->clickCount))
} }
alloc_field (object, id_movementX, alloc_float (event->movementX)); alloc_field (object, id_movementX, alloc_float (event->movementX));
@@ -70,6 +73,7 @@ namespace lime {
MouseEvent* eventObject = (MouseEvent*)MouseEvent::eventObject->Get (); MouseEvent* eventObject = (MouseEvent*)MouseEvent::eventObject->Get ();
eventObject->button = event->button; eventObject->button = event->button;
eventObject->clickCount = event->clickCount;
eventObject->movementX = event->movementX; eventObject->movementX = event->movementX;
eventObject->movementY = event->movementY; eventObject->movementY = event->movementY;
eventObject->type = event->type; eventObject->type = event->type;