From 74ca597de7ce26b8e018c1d560fbe1ab8cebf051 Mon Sep 17 00:00:00 2001 From: Dominique Loiseau <5888729+domi7777@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:32:35 +0200 Subject: [PATCH] fix: tsc --- src/scenes/LoopTracksScene.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/scenes/LoopTracksScene.ts b/src/scenes/LoopTracksScene.ts index 3e77e48..b76a645 100644 --- a/src/scenes/LoopTracksScene.ts +++ b/src/scenes/LoopTracksScene.ts @@ -1,9 +1,9 @@ import Phaser from 'phaser'; import {HexaColor, hexToColor} from '../colors.ts'; -const trackColorsState: Record = { - true: '#DDD', - false: '#000', +const trackColorsState: Record = { + selected: '#DDD', + unselected: '#000', } type Track = { @@ -13,7 +13,7 @@ type Track = { }; export class LoopTracksScene extends Phaser.Scene { - private tracks: Track[] + private tracks!: Track[] constructor() { super('LoopTracksScene'); @@ -65,7 +65,7 @@ export class LoopTracksScene extends Phaser.Scene { private updateSelectedColor() { this.tracks.forEach(({button, selected}) => { - button.setFillStyle(hexToColor(trackColorsState[selected])); + button.setFillStyle(hexToColor(selected? trackColorsState.selected: trackColorsState.unselected)); }); } }