Include button/id in mouse/touch events
This commit is contained in:
@@ -225,7 +225,7 @@ namespace lime {
|
||||
|
||||
}
|
||||
|
||||
mouseEvent.id = event->button.button - 1;
|
||||
mouseEvent.button = event->button.button - 1;
|
||||
mouseEvent.x = event->button.x;
|
||||
mouseEvent.y = event->button.y;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace lime {
|
||||
AutoGCRoot* MouseEvent::callback = 0;
|
||||
AutoGCRoot* MouseEvent::eventObject = 0;
|
||||
|
||||
static int id_id;
|
||||
static int id_button;
|
||||
static int id_type;
|
||||
static int id_x;
|
||||
static int id_y;
|
||||
@@ -17,7 +17,7 @@ namespace lime {
|
||||
|
||||
MouseEvent::MouseEvent () {
|
||||
|
||||
id = 0;
|
||||
button = MOUSE_BUTTON_LEFT;
|
||||
type = MOUSE_DOWN;
|
||||
x = 0.0;
|
||||
y = 0.0;
|
||||
@@ -31,7 +31,7 @@ namespace lime {
|
||||
|
||||
if (!init) {
|
||||
|
||||
id_id = val_id ("id");
|
||||
id_button = val_id ("button");
|
||||
id_type = val_id ("type");
|
||||
id_x = val_id ("x");
|
||||
id_y = val_id ("y");
|
||||
@@ -41,7 +41,7 @@ namespace lime {
|
||||
|
||||
value object = (MouseEvent::eventObject ? MouseEvent::eventObject->get () : alloc_empty_object ());
|
||||
|
||||
alloc_field (object, id_id, alloc_int (event->id));
|
||||
alloc_field (object, id_button, alloc_int (event->button));
|
||||
alloc_field (object, id_type, alloc_int (event->type));
|
||||
alloc_field (object, id_x, alloc_float (event->x));
|
||||
alloc_field (object, id_y, alloc_float (event->y));
|
||||
|
||||
Reference in New Issue
Block a user