From 1e97daa5599ef4208f5d338b6a48d4b1a712e691 Mon Sep 17 00:00:00 2001 From: TheShock Date: Wed, 6 Feb 2013 01:13:28 +0200 Subject: [PATCH] Event in TIleEngine.Mouse --- Source/Engines/Tile/Mouse.js | 32 ++++++++++++++++---------------- libcanvas-full-compiled.js | 32 ++++++++++++++++---------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Source/Engines/Tile/Mouse.js b/Source/Engines/Tile/Mouse.js index 629d88a..b61ea29 100644 --- a/Source/Engines/Tile/Mouse.js +++ b/Source/Engines/Tile/Mouse.js @@ -47,38 +47,38 @@ declare( 'LibCanvas.Engines.Tile.Mouse', { (events); }, /** @private */ - mousemove: function () { + mousemove: function (e) { var cell = this.get(); if (this.previous != cell) { - this.outCell(); - this.fire( 'over', cell ); + this.outCell(e); + this.fire( 'over', cell, e ); this.previous = cell; } }, /** @private */ - mouseout: function () { - this.outCell(); + mouseout: function (e) { + this.outCell(e); }, /** @private */ - mousedown: function () { + mousedown: function (e) { var cell = this.get(); - this.fire( 'down', cell ); + this.fire( 'down', cell, e ); this.lastDown = cell; }, /** @private */ - mouseup: function () { + mouseup: function (e) { var cell = this.get(); - this.fire( 'up', cell ); + this.fire( 'up', cell, e ); if (cell != null && cell == this.lastDown) { - this.fire( 'click', cell ); + this.fire( 'click', cell, e ); } this.lastDown = null; }, /** @private */ - contextmenu: function () { + contextmenu: function (e) { var cell = this.get(); if (cell != null) { - this.fire( 'contextmenu', cell ); + this.fire( 'contextmenu', cell, e ); } }, /** @private */ @@ -89,14 +89,14 @@ declare( 'LibCanvas.Engines.Tile.Mouse', { }, /** @private */ - fire: function (event, cell) { - return this.events.fire( event, [ cell ]); + fire: function (event, cell, e) { + return this.events.fire( event, [ cell, e ]); }, /** @private */ - outCell: function () { + outCell: function (e) { if (this.previous) { - this.fire( 'out', this.previous ); + this.fire( 'out', this.previous, e ); this.previous = null; } } diff --git a/libcanvas-full-compiled.js b/libcanvas-full-compiled.js index 68c45e3..1d6b1ee 100644 --- a/libcanvas-full-compiled.js +++ b/libcanvas-full-compiled.js @@ -7705,38 +7705,38 @@ declare( 'LibCanvas.Engines.Tile.Mouse', { (events); }, /** @private */ - mousemove: function () { + mousemove: function (e) { var cell = this.get(); if (this.previous != cell) { - this.outCell(); - this.fire( 'over', cell ); + this.outCell(e); + this.fire( 'over', cell, e ); this.previous = cell; } }, /** @private */ - mouseout: function () { - this.outCell(); + mouseout: function (e) { + this.outCell(e); }, /** @private */ - mousedown: function () { + mousedown: function (e) { var cell = this.get(); - this.fire( 'down', cell ); + this.fire( 'down', cell, e ); this.lastDown = cell; }, /** @private */ - mouseup: function () { + mouseup: function (e) { var cell = this.get(); - this.fire( 'up', cell ); + this.fire( 'up', cell, e ); if (cell != null && cell == this.lastDown) { - this.fire( 'click', cell ); + this.fire( 'click', cell, e ); } this.lastDown = null; }, /** @private */ - contextmenu: function () { + contextmenu: function (e) { var cell = this.get(); if (cell != null) { - this.fire( 'contextmenu', cell ); + this.fire( 'contextmenu', cell, e ); } }, /** @private */ @@ -7747,14 +7747,14 @@ declare( 'LibCanvas.Engines.Tile.Mouse', { }, /** @private */ - fire: function (event, cell) { - return this.events.fire( event, [ cell ]); + fire: function (event, cell, e) { + return this.events.fire( event, [ cell, e ]); }, /** @private */ - outCell: function () { + outCell: function (e) { if (this.previous) { - this.fire( 'out', this.previous ); + this.fire( 'out', this.previous, e ); this.previous = null; } }