Richard Davey
afe3d7ff7b
Update InputPlugin.js
2020-04-27 16:40:33 +01:00
Richard Davey
2d05802125
Merge pull request #4851 from rexrainbow/Input-event-of-container-bug
...
Fix input-event bug in nested container
2020-04-27 13:50:16 +01:00
Richard Davey
e1b8b04623
Merge pull request #4975 from JasonHK/jsdoc
...
Fixed `this` return types
2020-04-27 13:25:58 +01:00
Richard Davey
e85a66f4e9
Shouldn't be part of the Container
2020-04-27 13:04:08 +01:00
Richard Davey
f66e05b81d
Merge pull request #5042 from Minious/master
...
Fix wrong Container.getBounds with child container
2020-04-27 13:01:53 +01:00
Richard Davey
2c80fad116
When enabling a Game Object for Input Debugging the created debug shape will now factor in the position, scale and rotation of the Game Objects parent Container, if it has one. #4998
2020-04-27 12:52:36 +01:00
Richard Davey
9f5ac5e46b
Merge pull request #4998 from scott20145/fix_inputdebug_shape_position
...
Fix inputDebug shape position when the target is inside a container
2020-04-27 12:45:25 +01:00
Godard
5fd94d76a7
fix Input enableDebug function, add debug Shape to parentContainer
2020-04-09 12:04:20 -04:00
scott.l
10322fcd3a
use gameObject's world position as the debug shape position
2020-02-11 00:34:38 +08:00
Jason Kwok
3367ddc1fe
Fixed this
return types for Phaser.Input.InputPlugin
2020-01-30 17:48:47 +08:00
mkt
912c0e3bbc
set depth of input debug body
2020-01-22 19:01:26 +01:00
Richard Davey
ff65e69cd1
Changed copyright date to 2020
2020-01-15 12:07:09 +00:00
Richard Davey
55a4146726
Merge pull request #4826 from Olliebrown/input-drag-thresholds
...
Fixes for malfunctioning Drag Threshold properties (Issue #4667 )
2019-11-18 15:51:26 +00:00
Hua
3b47221d25
Fix input-event bug in nested container
2019-11-06 15:51:01 +08:00
Seth Berrier
174dcfdada
Fixes for drawing of hitboxes in input.debug
...
- Offset hitboxes now draw properly when debug enabled for all shapes
- Addresses issue #4722
2019-10-28 09:43:25 -05:00
Seth Berrier
7b711bd11b
Fixes for malfunctioning Drag Threshold properties
...
- According to issue #4667 drag thresholds have been broken since 3.18
- Changed processDragMove event to check thresholds if set
- Fixed use of '||' when it should be '&&' for skipping threshold checks
- Adding missing 'time' parameter when calling threshold check function
2019-10-25 14:03:43 -05:00
Richard Davey
9f8e9d2afc
InputPlugin.processDragMove
has been updated so that the resulting dragX
and dragY
values, sent to the event handler, now compensate for the scale of the Game Objects parent container, if inside of one. This means dragging a child of a scale Container will now still drag at 'full' speed.
2019-09-16 15:47:18 +01:00
Richard Davey
08c09b539d
Added enableDebug
and removeDebug
from the Input Plugin, allowing you to create debug shapes to test where input hit areas are.
2019-07-19 15:16:10 +01:00
Richard Davey
131bf336ee
Update Pointers every frame, if not already updated.
2019-07-08 14:59:19 +01:00
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