From 8569ea4b3df540619064e3a35e1ab86d9c6a9c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Wed, 21 Jan 2015 01:00:00 +0100 Subject: [PATCH] Fixed initial arena size --- src/scripts/view/battle/Arena.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scripts/view/battle/Arena.ts b/src/scripts/view/battle/Arena.ts index e03a664..2ba9d22 100644 --- a/src/scripts/view/battle/Arena.ts +++ b/src/scripts/view/battle/Arena.ts @@ -24,7 +24,9 @@ module SpaceTac.View { super(battleview.game); var background = new Phaser.Button(battleview.game, 0, 0, "ui-arena-background"); - background.scale.set(this.stage.width / background.width, this.stage.height / background.height); + var expected_width = this.stage.width - 252; + var expected_height = this.stage.height - 100; + background.scale.set(expected_width/ background.width, expected_height / background.height); this.background = background; // Capture clicks on background @@ -40,7 +42,8 @@ module SpaceTac.View { } }, null); - this.add(this.background); + this.position.set(32, 100); + this.addChild(this.background); this.init(); }