Commit graph

109 commits

Author SHA1 Message Date
Richard Davey
d9a9c7a5a1 esline tidy-up. 2017-11-28 11:15:45 +00:00
Richard Davey
4969bf37e6 The local input manager has a reference to the active pointer. 2017-11-28 11:15:35 +00:00
Richard Davey
4f7a02ef2e Pointer.position is now a Vec2 and x/y references to it 2017-11-23 01:44:58 +00:00
Richard Davey
829f33aa85 Input area should use realWidth and realHeight 2017-11-07 14:55:33 +00:00
Jower
b4cc15414a Remove redundant checks 2017-11-03 11:28:27 +01:00
Richard Davey
c93f571c32 SceneInputManager now uses the Scene event dispatcher. Fix #3085 2017-11-02 16:14:11 +00:00
Richard Davey
f03a829cfd Fixed setPoll method names 2017-10-08 22:38:32 +01:00
Richard Davey
6431d99908 Added ability to set dragStart, drag and dragEnd callbacks. 2017-09-29 11:40:11 +01:00
Igor Petushkov
31c38ad942 fix KeyCombo [TypeError: Cannot read property 'on' of undefined] 2017-09-27 19:04:39 +03:00
Richard Davey
669f2e8350 Fixed callbacks not firing if an event nukes an interactive Game Object. 2017-09-25 16:06:16 +01:00
Richard Davey
e224faa903 Added space and shift to createCursors method 2017-09-16 03:08:09 +01:00
Richard Davey
01df434a72 Moving from using the name 'components' to 'inc' where it's a case of the method being spllit into its own file to keep things clean, rather than an actual component. 2017-09-13 14:17:38 +01:00
Richard Davey
6321a9d843 Fixed pad === null error when browser reports undefined instead 2017-09-12 12:41:20 +01:00
Richard Davey
5369ecbffe Added in Gamepad axis support
Also removed issue stopping analogue buttons working properly. Added in config for DualShock 4 controller.
2017-09-11 01:28:09 +01:00
Richard Davey
e61889f49a Added gamepads to Device feature test 2017-09-09 03:28:38 +01:00
Richard Davey
f98bbc12d8 Added the new Gamepad Input classes 2017-09-09 03:17:13 +01:00
Richard Davey
9bc448341e Added x/y getters to input manager for quick (if limited) access 2017-09-07 22:26:53 +01:00
Richard Davey
7670ec50bb Derive game instance from Scene 2017-08-15 23:35:35 +01:00
photonstorm
52bb355429 Removing old and incorrect jsdoc blocks ready for first documentation pass. 2017-08-01 13:10:08 +01:00
Richard Davey
fae3223000 Only consider inputEnabled cameras and removed some old jsdocs 2017-07-29 02:52:12 +01:00
Richard Davey
ed59579220 Pointer now records which camera it used and all events now carry a camera property 2017-07-29 01:55:17 +01:00
Richard Davey
e9d7940e74 HitTest only tests the camera below the pointer and there is no benefit polling every single camera 2017-07-29 01:54:17 +01:00
Richard Davey
8980616962 Input Manager now uses Camera Manager directly 2017-07-29 01:53:49 +01:00
Richard Davey
08ce1c37da Fixed HitTest issue with scrollFactor 2017-07-29 01:05:46 +01:00
photonstorm
db113b58da Exposed the camera responsible for the input event. 2017-07-28 18:22:57 +01:00
photonstorm
c8a1dc32cc Updated drag event. 2017-07-28 18:00:04 +01:00
photonstorm
9e10fca98d Added Touch support. Doesn't handle multi-touch yet, but single touch works perfectly with all current input tests. 2017-07-28 03:28:10 +01:00
photonstorm
e20d4b1156 Now possible to clear interactive objects. 2017-07-28 01:17:18 +01:00
photonstorm
d2f08f0818 Added 'dropped' property to the DragEnd event. 2017-07-28 00:46:37 +01:00
photonstorm
a2d1f86079 Added DragEnter, DragOver and DragLeave events for drop zones. 2017-07-28 00:29:22 +01:00
photonstorm
98f75599a5 Added Drop Event and handler for it. 2017-07-27 18:24:04 +01:00
photonstorm
b71972fac5 Reverted dragX/Y calc. 2017-07-27 17:56:48 +01:00
photonstorm
228ca47274 Updating drag values. 2017-07-27 17:40:22 +01:00
photonstorm
80aa157a11 Falls back to GO width / height if no frame. 2017-07-27 17:38:31 +01:00
photonstorm
d5ed070fe6 Added missing reference in onDrag. 2017-07-27 14:33:03 +01:00
photonstorm
619caae3c3 Added new drag callbacks to allowed types list. 2017-07-27 14:23:41 +01:00
photonstorm
5fb219a800 GameObjects that cannot render are not considered for input. 2017-07-27 14:23:30 +01:00
photonstorm
bd2e25e791 Swapped back to using non-class IO. 2017-07-27 14:23:14 +01:00
photonstorm
a1dc398a8e Added callback hooks and removed duplicated vars. 2017-07-27 14:22:58 +01:00
photonstorm
68270e7eee Swapped back from being a class to just being an object. No need for class overhead here. 2017-07-27 14:22:44 +01:00
Richard Davey
a8a642bc29 Fixed assignments 2017-07-27 03:59:45 +01:00
Richard Davey
5cc32c4804 Fixed splice bug. 2017-07-27 03:50:21 +01:00
Richard Davey
795fa5f5cb Merging in the draggable input handler 2017-07-27 03:40:58 +01:00
Richard Davey
aac61e5b57 Removed button property from event, get it from the Pointer instead 2017-07-25 12:34:06 +01:00
Richard Davey
f918942cfc Pointer has methods that expose the state of the buttons 2017-07-25 12:33:53 +01:00
Richard Davey
87edd6cb94 Added option to disable context menu
Added to both the game config and as a function in the Mouse Manager.
2017-07-25 12:33:37 +01:00
Richard Davey
1b4e53d06f Exposed buttons event property. 2017-07-25 04:53:23 +01:00
Richard Davey
e17118c1aa Tidying up after refactor.
Everything working properly and faster than before. Swapped InteractiveObject for a class to help internal optimisation.
2017-07-25 04:10:50 +01:00
Richard Davey
320a0b893d Preparing to normalize game object data 2017-07-25 02:47:26 +01:00
Richard Davey
466b0b11ca Fixed argument 2017-07-24 23:54:28 +01:00