Commit graph

106 commits

Author SHA1 Message Date
Richard Davey
14a6864f21 If you called Scene.destroy within a Game Object pointerdown or pointerup handler, it would cause the error "Cannot read property 'game' of null" if the event wasn't cancelled in your handler. It now checks if the manager is still there before accessing its property. Fix #4436 2019-06-27 01:13:27 +01:00
Rex
16a038674f Set customHitArea to false if shape is not defined
In setHitArea method, use setHitAreaFromTexture if shape is undefined. Suppose that it is not a case of `customHitArea`
2019-06-22 09:37:49 +08:00
Richard Davey
8837cb3fd1 JSDocs fix 2019-06-20 09:58:48 +01:00
Richard Davey
1676f22360 Automatically handle the drag values in rotated containers 2019-06-19 10:41:48 +01:00
Richard Davey
98be6adfda Native support for wheel events 2019-06-05 15:31:13 +01:00
Richard Davey
af3efc9e2f Added more docs to make #4575 clearer 2019-06-05 14:08:01 +01:00
Richard Davey
bf48c53103 Added new over and out handlers for touch events 2019-06-04 15:43:02 +01:00
Richard Davey
3c52a3b27a Pass the pointers array in directly, no need to iterate them all every time 2019-05-28 21:31:54 +01:00
Richard Davey
d87cb43a7f Removed touch limit on over/out 2019-05-28 17:26:31 +01:00
Richard Davey
e12002bf74 Use a switch instead 2019-05-28 17:21:40 +01:00
Richard Davey
520e2e621f Catch poll zero 2019-05-28 17:08:30 +01:00
Richard Davey
95f69bbd9e Split the drag method up into different parts, removed un-used properties and tided up the loop 2019-05-28 16:58:52 +01:00
Richard Davey
961e858cbf Working through making the Input system DOM responsive and not reliant on the game step 2019-05-24 19:30:13 +01:00
Richard Davey
1d1c4e6543 Removed all input queue elements 2019-05-23 17:19:03 +01:00
Richard Davey
c91ed91ce3 License link update 2019-05-10 16:15:04 +01:00
Richard Davey
1dca2c2c8a Scenes Types 2019-05-09 12:37:37 +01:00
Richard Davey
290389c4ae Input Types 2019-05-09 12:02:03 +01:00
Richard Davey
95eb4fc03d Setting pixelPerfect when input enabling a Container would cause it to crash, because Container's don't have a texture to check. It will now throw a run-time warning and skip the Container for input. You should use a custom input callback instead. Fix #4492 2019-04-26 10:56:06 +01:00
Richard Davey
64532d8d7b InputPlugin.clear has a new argument skipQueue which is used to avoid clearing a Game Object twice. This, combined with the fix for 4463 means you will no longer get a Cannot read property 'dragState' error if you destroy a Game Object enabled for drag where another draggable object exists. Fix #4228 2019-04-24 13:38:40 +01:00
Richard Davey
00dbf8b03e Destroying a Game object during its pointerup event handler on a touch device will no longer cause Uncaught TypeError: Cannot read property 'localX' of undefined. All InputPlugin process handlers now check to see if the Game Object has been destroyed at any stage and abort if it has. Fix #4463 2019-04-24 12:54:56 +01:00
Richard Davey
507bb6a215 Added customHitArea boolean property 2019-04-24 11:21:52 +01:00
Richard Davey
95b18ae6e0 Refined poll rate handling and added pluginUpdate 2019-04-24 10:03:58 +01:00
Richard Davey
43c72e23c6 Fixed issue with input events running twice 2019-04-24 09:34:40 +01:00
Richard Davey
e0255c6f0f Docs fix 2019-04-16 17:08:19 +01:00
Richard Davey
0cfbc7917e The InputPlugin will now dispatch an update event regardless, allowing the Gamepad Plugin to update itself every frame, regardless of DOM events. This allows Gamepads to work correctly again. Fix #4414 2019-04-08 14:39:28 +01:00
Richard Davey
0db663d901 More typedefs 2019-02-13 15:38:50 +00:00
Richard Davey
3938675d9f Input typedefs 2019-02-13 14:17:36 +00:00
Richard Davey
3104246386
Merge pull request #4347 from rgk/patch-5
On mobile, have pointerup and pointerout get triggered together.
2019-02-10 21:17:24 +00:00
Richard Davey
f3f65d1437 Refactored the game over and out handling to work with the non-legacy input system. Fix #4344 2019-02-10 17:10:13 +00:00
Robert Kowalski
6105c1a9b2
Emit pointerout always after pointerup on touch.
Now pointerout will always emit after pointerup.
2019-02-08 09:33:25 -05:00
Robert Kowalski
b94f655405
Only needs to be cleared once.
No need for the duplicate clearing of this, and quick fix.
2019-02-06 11:38:50 -05:00
Robert Kowalski
8cd8b6f98e
Stops pointerover from being triggered if pointerup has been.
In 3.16.1 if you trigger pointerup and then move to another button, the past buttons pointerover event gets triggered. This clears that and stops that from happening by stopping pointerover from being triggered if pointerup has been.
2019-02-06 11:27:22 -05:00
Richard Davey
aa967cdbc0 Removed process listener. 2019-01-29 01:04:09 +00:00
Richard Davey
b3bc1cebfd Support the Input Manager useQueue flag. 2019-01-23 15:51:42 +00:00
Richard Davey
bc962c25dc All listeners use the new Events 2019-01-18 13:41:43 +00:00
Richard Davey
e4902e3b2c Removed old event docs 2019-01-17 10:34:41 +00:00
Richard Davey
e364b64a57 Added the rest of the input events! 2019-01-16 13:12:07 +00:00
Richard Davey
01905f0cb6 Added lots of the Input Events 2019-01-16 12:13:30 +00:00
Richard Davey
aa341854c7 Happy New Year 2019-01-15 16:20:22 +00:00
Richard Davey
21c9326e07 Change when dragState is populated. Fix #4278 2019-01-05 10:03:11 +00:00
Richard Davey
730c84e3e3 Draggable Game Objects would not work if you had multiple Scenes running in parallel, with draggable objects in both of them. Only the top-most Scene would work fully. Items in the bottom Scene would never finish their drag cycle, causing them to get stuck. Fix #4249 2019-01-04 16:34:59 +00:00
Richard Davey
1b28080575 Added pointerupoutside and pointerdownoutside events. 2018-11-29 13:44:42 +00:00
Richard Davey
4a312f16db Input Plugin will now emit a gameover or gameout event and has an isOver property. 2018-11-28 13:10:54 +00:00
Richard Davey
93a76475ea The Input Plugin was emitting a preUpdate event, with the capital U, instead of preupdate. This has now been corrected. Fix #4185 2018-11-26 11:13:25 +00:00
Richard Davey
d6bee1bbd1 Working through event debugging - don't pull this version unless you want logs everywhere! 2018-11-22 17:18:31 +00:00
Richard Davey
837cc4e86d Swapped hit area size detection priority 2018-11-12 23:19:49 +00:00
samme
7ff8d51f98 Docs for input and physics events 2018-10-24 12:14:44 -07:00
Richard Davey
4b1c762296 Updated @memberOf to @memberof 2018-10-10 10:49:13 +01:00
Richard Davey
a9063604dc Replace @readOnly with @readonly 2018-10-09 13:40:00 +01:00
Richard Davey
e92a01985e If you destroyed a Game Object that had a custom cursor set during one of its input events the cursor didn't correctly reset. Fix #4033 2018-09-14 14:48:53 +01:00