Richard Davey
57657ce76c
Updated JSDocs. Fix #5268
2020-09-11 11:08:43 +01:00
Richard Davey
56bbfbcb62
Removed capture
and added preventDefaultDown
, Up
and Move
instead. Also better passive handling and smaller listeners.
2020-09-11 10:59:47 +01:00
Richard Davey
a04690d5af
The onMouse
events in the Input Manager didn't reset the activePointer
property to the mouse, meaning on dual-input systems such as Touch Screen devices, the active pointer would become locked to whichever input method was used first. Fix #4615 #5232
2020-09-11 09:48:13 +01:00
Richard Davey
205552d69c
Fix namespaces. Fix #5289
2020-09-10 17:04:56 +01:00
Richard Davey
5e9b629a97
Merge pull request #5284 from samme/feature/scene-resume-wake-reset-keys
...
Reset keys when scene sleeps or pauses
2020-09-02 21:50:42 +01:00
samme
288d023bab
Reset keys when scene sleeps or pauses #5281
2020-09-01 12:42:57 -07:00
Richard Davey
d2cc809fdb
Exported functions to namespace
2020-09-01 18:56:01 +01:00
Richard Davey
02ac6bcb7d
If inputWindowEvents
is set in the Game Config, then the MouseManager
will now listen for the events on window.top
instead of just window
, which should help in situations where the pointer is released outside of an embedded iframe. Fix #4824
2020-09-01 17:51:17 +01:00
Richard Davey
e93d36f38e
The Pointer.getDuration
method now uses the new Pointer downTime
and upTime
values, meaning it will accurately report the duration of when any button is being held down, not just the primary one. Fix #5112
...
* `Pointer.downTime` now stores the event timestamp of when the first button on the input device was pressed down, not just when button 1 was pressed down.
* `Pointer.upTime` now stores the event timestamp of when the final depressed button on the input device was released, not just when button 1 was released.
2020-08-24 17:32:21 +01:00
samme
981a4b1a0a
Rename all setInteractive() arguments, and docs
2020-08-03 13:33:30 -07:00
Richard Davey
0d04e40e28
Updated jsdocs
2020-08-03 17:54:40 +01:00
Richard Davey
2810396dc7
The KeyboardPlugin
will now track the key code and timestamp of the previous key pressed and compare it to the current event. If they match, it will skip the event. On some systems if you were to type quickly, you would sometimes get duplicate key events firing (the exact same event firing more than once). This is now prevented from happening.
2020-08-01 21:06:42 +01:00
Richard Davey
c4000843ec
The KeyboardManager
and KeyboardPlugin
were both still checking for the InputManager.useQueue
property, which was removed several versions ago.
2020-08-01 20:54:45 +01:00
Richard Davey
fccd00e8c5
Remove deprecated events
2020-08-01 20:32:50 +01:00
Richard Davey
6c7437cdc4
Merge pull request #5198 from samme/feature/KeyboardPlugin-removeAllKeys
...
Add KeyboardPlugin#removeAllKeys
2020-07-13 13:04:53 +01:00
Richard Davey
a7ded1ee21
KeyboardPlugin.checkDown
didn't set the duration
to zero if the parameter was omitted, causing it to always return false. Fix #5146
2020-07-13 12:12:28 +01:00
Richard Davey
9a34fa9197
Merge pull request #5171 from samme/fix/input-noop
...
Fix NOOP import
2020-07-13 11:42:32 +01:00
Jay Mattis
c5cfae0118
Fix drag coordinates with camera zoom (issue 4755)
...
The dragX and dragY passed to 'dragStart' and 'drag' events are supported to be in world coordinates (as specified by the docs) but the coordinates used (pointer.x and pointer.y) were not transformed by the camera into world space. The drags now use pointer.worldX and pointer.worldY which are the post-transform coordinates.
2020-07-12 21:13:33 -07:00
samme
af141f6bf0
Add KeyboardPlugin#removeAllKeys
2020-06-23 11:58:26 -07:00
samme
4722750f62
Fix NOOP import
...
Fixes #5170
2020-05-27 18:20:05 -07:00
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
f8fd901d96
Fixed this
return types for Phaser.Input.Touch.TouchManager
2020-01-30 23:46:02 +08:00
Jason Kwok
fc51d38e47
Fixed this
return types for Phaser.Input.Mouse.MouseManager
2020-01-30 23:43:02 +08:00
Jason Kwok
3367ddc1fe
Fixed this
return types for Phaser.Input.InputPlugin
2020-01-30 17:48:47 +08:00
Jason Kwok
23ad6e4241
Fixed this
return types for Phaser.Input.Keyboard.KeyboardPlugin
2020-01-30 17:42:59 +08:00
Jason Kwok
c71acd3725
Fixed this
return types for Phaser.Input.Keyboard.Key
2020-01-30 17:40:23 +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
Javier García Álvarez
9d418eae73
Fixed jsdoc types to get TS definition intellisense.
2019-12-18 12:25:14 +01:00
F. Selçuk Can
4354255602
changed L12 "pointerup"
to "pointerout"
2019-11-26 13:33:29 +03:00
Richard Davey
1e20ad706e
ADD and SUBTRACT added
2019-11-18 17:09:30 +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
c60530eedd
Removed commented-out code
2019-10-11 18:35:27 +01:00
Richard Davey
be15a59093
Your guess is as good as mine \o/~?
2019-10-11 18:19:25 +01:00
Richard Davey
c1044379f3
TouchManager.disableContextMenu
is a new method that will try to disable the context menu on touch devices, if the Game Config disableContextMenu
is set. Previously, it only tried to do it for the Mouse Manager, but now does it for touch as well. Fix #4778
2019-10-11 13:42:33 +01:00
Richard Davey
4e8ab3dcae
MouseManager.target
can now be defined as either a string or by passing an HTMLElement directly. Fix #4353
2019-10-02 13:39:42 +01:00
Richard Davey
4be4ba4823
Merge pull request #4707 from MatthewAlner/Bug#4706-ignored-attempt-to-cancel-a-touchstart
...
Bug#4706 add `event.cancelable` check
2019-09-26 12:09:06 +01:00
Richard Davey
d875a59958
InteractiveObject.alwaysEnabled
is a new boolean that allows an interactive Game Object to always receive input events, even if it's invisible or won't render.
2019-09-24 12:36:28 +01: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