Cleanup, using Mouse.warp and Mouse.lock, window.onMouseMoveRelative, removing 'button' value from mouse move event

This commit is contained in:
Joshua Granick
2015-03-26 02:10:08 -07:00
parent 3ea7830673
commit 6d8c9458fe
24 changed files with 233 additions and 204 deletions

View File

@@ -9,6 +9,8 @@ namespace lime {
AutoGCRoot* MouseEvent::eventObject = 0;
static int id_button;
static int id_movementX;
static int id_movementY;
static int id_type;
static int id_x;
static int id_y;
@@ -21,6 +23,8 @@ namespace lime {
type = MOUSE_DOWN;
x = 0.0;
y = 0.0;
movementX = 0.0;
movementY = 0.0;
}
@@ -32,6 +36,8 @@ namespace lime {
if (!init) {
id_button = val_id ("button");
id_movementX = val_id ("movementX");
id_movementY = val_id ("movementY");
id_type = val_id ("type");
id_x = val_id ("x");
id_y = val_id ("y");
@@ -47,6 +53,8 @@ namespace lime {
}
alloc_field (object, id_movementX, alloc_float (event->movementX));
alloc_field (object, id_movementY, alloc_float (event->movementY));
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));