Skip to content

Commit

Permalink
Update ScaleManager#startFullScreen docs (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
samme committed Jul 31, 2017
1 parent 77e8981 commit ab71242
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ If you code with [TypeScript](http://www.typescriptlang.org/) there are comprehe

### Updates

* Updated Phaser.ScaleManager#startFullScreen docs.
* Removed obsolete PIXI TypeScript definitions.
* Removed [filters/pixi](https://github.com/photonstorm/phaser-ce/tree/v2.8.3/filters/pixi). They require PIXI.AbstractFilter, which was removed in 2.7.0.
* Corrected documentation for InputHandler#enableDrag (alphaThreshold is not boolean).
Expand Down
14 changes: 12 additions & 2 deletions src/core/ScaleManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1793,14 +1793,24 @@ Phaser.ScaleManager.prototype = {
},

/**
* Start the browsers fullscreen mode - this _must_ be called from a user input Pointer or Mouse event.
* Display the game in the browser's fullscreen mode.
*
* The Fullscreen API must be supported by the browser for this to work - it is not the same as setting
* This _must_ be called from a user-input Pointer or Mouse event (and possibly a {@link https://www.chromestatus.com/feature/6131337345892352 "user gesture"}), e.g.,
*
* - {@link Phaser.Events#onInputUp}
* - {@link Phaser.Input#onUp} or {@link Phaser.Input#onTap}
* - `click`, `mousedown`, `mouseup`, `pointerup`, or `touchend`
*
* Games within an iframe will also be blocked from fullscreen unless the iframe has the `allowfullscreen` attribute.
*
* The {@link https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API Fullscreen API} must be {@link http://caniuse.com/#search=fullscreen supported by the browser} for this to work - it is not the same as setting
* the game size to fill the browser window. See {@link Phaser.ScaleManager#compatibility compatibility.supportsFullScreen} to check if the current
* device is reported to support fullscreen mode.
*
* The {@link #fullScreenFailed} signal will be dispatched if the fullscreen change request failed or the game does not support the Fullscreen API.
*
* Safari blocks access to keyboard events in fullscreen mode (as a security measure).
*
* @method Phaser.ScaleManager#startFullScreen
* @public
* @param {boolean} [antialias] - Changes the anti-alias feature of the canvas before jumping in to fullscreen (false = retain pixel art, true = smooth art). If not specified then no change is made. Only works in CANVAS mode.
Expand Down

0 comments on commit ab71242

Please sign in to comment.