New Timer class and scale event updates.

This commit is contained in:
photonstorm
2013-11-24 11:04:58 +00:00
parent 7d7aa795e7
commit 155c863d69
12 changed files with 344 additions and 151 deletions
+17 -3
View File
@@ -42,6 +42,11 @@ Phaser.Mouse = function (game) {
*/
this.mouseUpCallback = null;
/**
* @property {boolean} capture - If true the DOM mouse events will have event.preventDefault applied to them, if false they will propogate fully.
*/
this.capture = true;
/**
* @property {number} button- The type of click, either: Phaser.Mouse.NO_BUTTON, Phaser.Mouse.LEFT_BUTTON, Phaser.Mouse.MIDDLE_BUTTON or Phaser.Mouse.RIGHT_BUTTON.
* @default
@@ -165,7 +170,10 @@ Phaser.Mouse.prototype = {
this.event = event;
event.preventDefault();
if (this.capture)
{
event.preventDefault();
}
this.button = event.which;
@@ -194,7 +202,10 @@ Phaser.Mouse.prototype = {
this.event = event;
event.preventDefault();
if (this.capture)
{
event.preventDefault();
}
if (this.mouseMoveCallback)
{
@@ -221,7 +232,10 @@ Phaser.Mouse.prototype = {
this.event = event;
event.preventDefault();
if (this.capture)
{
event.preventDefault();
}
this.button = Phaser.Mouse.NO_BUTTON;