* Fixed issue in Sound.play where if you gave a missing marker it would play the whole sound sprite instead.

* Button.setFrames will set the current frame based on the button state immediately.
* InputHandler now creates the _pointerData array on creation and populates with one empty set of values, so pointerOver etc all work before a start call.
* Added Canvas.setUserSelect() to disable touchCallouts and user selections within the canvas.
* When the game boots it will now by default disable user-select and touch action events on the game canvas.
* Loaded.setPreloadSprite now rounds the width/height values and starts from 1. This fixes canvas draw errors in IE9/10 and Firefox.
This commit is contained in:
Richard Davey
2013-09-30 17:12:22 +01:00
parent 8d17e1f963
commit 16b1913de1
7 changed files with 114 additions and 31 deletions
+4 -4
View File
@@ -105,12 +105,12 @@ Phaser.Loader.prototype = {
if (direction == 0)
{
// Horizontal crop
this.preloadSprite.crop = new Phaser.Rectangle(0, 0, 0, sprite.height);
this.preloadSprite.crop = new Phaser.Rectangle(0, 0, 1, sprite.height);
}
else
{
// Vertical crop
this.preloadSprite.crop = new Phaser.Rectangle(0, 0, sprite.width, 0);
this.preloadSprite.crop = new Phaser.Rectangle(0, 0, sprite.width, 1);
}
sprite.crop = this.preloadSprite.crop;
@@ -904,11 +904,11 @@ Phaser.Loader.prototype = {
{
if (this.preloadSprite.direction == 0)
{
this.preloadSprite.crop.width = (this.preloadSprite.width / 100) * this.progress;
this.preloadSprite.crop.width = Math.floor((this.preloadSprite.width / 100) * this.progress);
}
else
{
this.preloadSprite.crop.height = (this.preloadSprite.height / 100) * this.progress;
this.preloadSprite.crop.height = Math.floor((this.preloadSprite.height / 100) * this.progress);
}
this.preloadSprite.sprite.crop = this.preloadSprite.crop;