Button fixes and Input coordinate fixes.

This commit is contained in:
photonstorm
2013-10-25 02:19:16 +01:00
parent 1f28d328a7
commit 1469663ea5
4 changed files with 43 additions and 70 deletions
+10 -10
View File
@@ -200,25 +200,25 @@ Phaser.Utils.Debug.prototype = {
showText = showText || false;
showBounds = showBounds || false;
color = color || 'rgb(255,0,255)';
color = color || 'rgb(255,255,255)';
this.start(0, 0, color);
if (showBounds)
{
this.context.strokeStyle = 'rgba(0,255,0,0.8)';
this.context.strokeStyle = 'rgba(255,0,0,1)';
this.context.strokeRect(sprite.bounds.x, sprite.bounds.y, sprite.bounds.width, sprite.bounds.height);
this.context.stroke();
}
this.context.beginPath();
this.context.moveTo(sprite.topLeft.x, sprite.topLeft.y);
this.context.lineTo(sprite.topRight.x, sprite.topRight.y);
this.context.lineTo(sprite.bottomRight.x, sprite.bottomRight.y);
this.context.lineTo(sprite.bottomLeft.x, sprite.bottomLeft.y);
this.context.closePath();
this.context.strokeStyle = 'rgba(0,0,255,0.8)';
this.context.stroke();
// this.context.beginPath();
// this.context.moveTo(sprite.topLeft.x, sprite.topLeft.y);
// this.context.lineTo(sprite.topRight.x, sprite.topRight.y);
// this.context.lineTo(sprite.bottomRight.x, sprite.bottomRight.y);
// this.context.lineTo(sprite.bottomLeft.x, sprite.bottomLeft.y);
// this.context.closePath();
// this.context.strokeStyle = 'rgba(255,0,0,1)';
// this.context.stroke();
this.renderPoint(sprite.center);
this.renderPoint(sprite.topLeft);