module SpaceTac.View { "use strict"; // One item in a ship list (used in BattleView) export class ShipListItem extends Phaser.Button { // Reference to the ship game object private ship: Game.Ship; // Create a ship button for the battle ship list constructor(list: ShipList, x: number, y: number, ship: Game.Ship, owned: boolean) { this.ship = ship; super(list.battleview.game, x, y, owned ? "battle-shiplist-own" : "battle-shiplist-enemy"); this.input.useHandCursor = true; this.onInputOver.add(() => { list.battleview.cursorOnShip(ship); }); this.onInputOut.add(() => { list.battleview.cursorOffShip(ship); }); } } }