Skip to content

Commit 5889737

Browse files
committed
Preparing for cursor change support
1 parent 44569fe commit 5889737

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

src/input/InputManager.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ var InputManager = new Class({
140140
*/
141141
this._hasMoveCallback = false;
142142

143+
// this._usingHandCursor = false;
144+
this.setHandCursor = false;
145+
143146
/**
144147
* A reference to the Mouse Manager class, if enabled via the `input.mouse` Game Config property.
145148
*
@@ -374,6 +377,10 @@ var InputManager = new Class({
374377
{
375378
var i;
376379

380+
// Was the hand cursor set this frame?
381+
this.setHandCursor = false;
382+
383+
// TODO: Move to AFTER the events have all been processed, so the plugins are more current and not 1 frame behind?
377384
this.events.emit('update');
378385

379386
this.ignoreEvents = false;
@@ -445,6 +452,11 @@ var InputManager = new Class({
445452
}
446453
},
447454

455+
// useHandCursor: function ()
456+
// {
457+
// return (this._usingHandCursor && this._setHandCursor)
458+
// },
459+
448460
// event.targetTouches = list of all touches on the TARGET ELEMENT (i.e. game dom element)
449461
// event.touches = list of all touches on the ENTIRE DOCUMENT, not just the target element
450462
// event.changedTouches = the touches that CHANGED in this event, not the total number of them

src/input/InputPlugin.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,11 @@ var InputPlugin = new Class({
11631163

11641164
gameObject.emit('pointerover', pointer, gameObject.input.localX, gameObject.input.localY);
11651165

1166+
// if (gameObject.input.useHandCursor && manager.useHandCursor())
1167+
// {
1168+
// manager.isUsingHandCursor = true;
1169+
// }
1170+
11661171
totalInteracted++;
11671172
}
11681173
}

0 commit comments

Comments
 (0)