mirror of
https://github.com/photonstorm/phaser
synced 2024-11-28 07:31:11 +00:00
Preparing for cursor change support
This commit is contained in:
parent
44569fe20c
commit
5889737183
2 changed files with 17 additions and 0 deletions
|
@ -140,6 +140,9 @@ var InputManager = new Class({
|
|||
*/
|
||||
this._hasMoveCallback = false;
|
||||
|
||||
// this._usingHandCursor = false;
|
||||
this.setHandCursor = false;
|
||||
|
||||
/**
|
||||
* A reference to the Mouse Manager class, if enabled via the `input.mouse` Game Config property.
|
||||
*
|
||||
|
@ -374,6 +377,10 @@ var InputManager = new Class({
|
|||
{
|
||||
var i;
|
||||
|
||||
// Was the hand cursor set this frame?
|
||||
this.setHandCursor = false;
|
||||
|
||||
// TODO: Move to AFTER the events have all been processed, so the plugins are more current and not 1 frame behind?
|
||||
this.events.emit('update');
|
||||
|
||||
this.ignoreEvents = false;
|
||||
|
@ -445,6 +452,11 @@ var InputManager = new Class({
|
|||
}
|
||||
},
|
||||
|
||||
// useHandCursor: function ()
|
||||
// {
|
||||
// return (this._usingHandCursor && this._setHandCursor)
|
||||
// },
|
||||
|
||||
// event.targetTouches = list of all touches on the TARGET ELEMENT (i.e. game dom element)
|
||||
// event.touches = list of all touches on the ENTIRE DOCUMENT, not just the target element
|
||||
// event.changedTouches = the touches that CHANGED in this event, not the total number of them
|
||||
|
|
|
@ -1163,6 +1163,11 @@ var InputPlugin = new Class({
|
|||
|
||||
gameObject.emit('pointerover', pointer, gameObject.input.localX, gameObject.input.localY);
|
||||
|
||||
// if (gameObject.input.useHandCursor && manager.useHandCursor())
|
||||
// {
|
||||
// manager.isUsingHandCursor = true;
|
||||
// }
|
||||
|
||||
totalInteracted++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue