Skip to content

Commit de5283b

Browse files
committed
The default Button.onOverMouseOnly value has changed from false to true. If you used this in your touch enabled games then please be aware of this change (phaserjs#2083)
1 parent 0dee115 commit de5283b

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@ If you are an exceptional JavaScript developer and would like to join the Phaser
268268
* Canvas.getSmoothingPrefix will return the vendor prefixed smoothing enabled value from the context if set, otherwise null.
269269
* The Random Number Generator can now get and set its state via rnd.state. This allows you to do things like saving the state of the generator to a string that can be part of a save-game file and load it back in again (thanks @luckylooke #2056 #1900)
270270
* Device.iOSVersion now contains the major version number of iOS.
271+
* The new `PointerMode` enumeration value has been added for better simple input discrimination in the future, between active pointers such as touch screens and passive pointers, such as mouse cursors (thanks @pnstickne #2062)
272+
* Button.justReleasedPreventsOver controls if a just-release event
273+
on a pointer prevents it from being able to trigger an over event.
274+
* Button.forceOut expanded to accept a PointerMode value such that it
275+
can be controlled per-input mode.
271276

272277
### Updates
273278

@@ -289,6 +294,7 @@ If you are an exceptional JavaScript developer and would like to join the Phaser
289294
* Touch.addTouchLockCallback has a new argument `onEnd` which allows the callback to fire either on a touchstart or a touchend event.
290295
* The SoundManager now detects if the browser is running under iOS9 and uses a touchend callback to unlock the audio subsystem. Previous versions of iOS (and Android) still use touchstart. This fixes Apple's screw-up with regard to changing the way Web Audio should be triggered in Mobile Safari. Thanks Apple (thanks @MyCatCarlos for the heads-up #2095)
291296
* InputHandler.validForInput now checks if the game object has `input.enabled` set to `false` and doesn't validate it for input if that's the case.
297+
* The default Button.onOverMouseOnly value has changed from `false` to `true`. If you used this in your touch enabled games then please be aware of this change (#2083)
292298

293299
### Bug Fixes
294300

@@ -301,10 +307,11 @@ If you are an exceptional JavaScript developer and would like to join the Phaser
301307
* Under setTimeOut (or when `forceSetTimeOut` was true) the Time was incorrectly setting `Time.timeExpected` causing game updates to lag (thanks @satan6 #2087)
302308
* Fixes edge case when TilingSprite is removed before render (thanks @pnstickne #2097 #2092)
303309
* Camera.setBoundsToWorld only adjusts the bounds if it exists (thanks @prudolfs #2099)
310+
*
304311

305312
### Pixi Updates
306313

307-
Please note that Phaser uses a custom build of Pixi (and always has done), the following changes are those made to our custom build, not to Pixi in general.
314+
Please note that Phaser uses a custom build of Pixi and always has done. The following changes have been made to our custom build, not to Pixi in general.
308315

309316
* CanvasRenderer.mapBlendModes optimised to cut down on file size.
310317
* PIXI.WebGLRenderer.updateTexture now returns a boolean depending on if the texture was successfully bound to the gl context or not.

src/gameobjects/Button.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame,
170170
* @property {boolean} onOverMouseOnly
171171
* @default
172172
*/
173-
this.onOverMouseOnly = false;
173+
this.onOverMouseOnly = true;
174174

175175
/**
176176
* Suppresse the over event if a pointer was just released and it matches the given {@link Phaser.PointerModer pointer mode bitmask}.

0 commit comments

Comments
 (0)