From c698048224477ca81e4c20f010c6d127c0bc4a64 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Thu, 25 Apr 2024 12:46:19 +0100 Subject: [PATCH] ctrlpad: fix colour types --- apps/ctrlpad/main.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/ctrlpad/main.ts b/apps/ctrlpad/main.ts index 94b92ba03..b908b68d1 100644 --- a/apps/ctrlpad/main.ts +++ b/apps/ctrlpad/main.ts @@ -69,8 +69,8 @@ type Control = { x: number, y: number, - fg: string, //ColorResolvable, TODO - bg: string, //ColorResolvable, + fg: ColorResolvable, + bg: ColorResolvable, text: string, }; @@ -83,7 +83,7 @@ fg: "#000", bg: "#bbb", }, - }; + } as const; class Controls { controls: [Control, Control, Control, Control, Control]; @@ -122,9 +122,9 @@ for(const ctrl of single ? [single] : this.controls){ g - .setColor(ctrl.bg as any) // FIXME + .setColor(ctrl.bg) .fillCircle(ctrl.x, ctrl.y, 23) - .setColor(ctrl.fg as any) // FIXME + .setColor(ctrl.fg) .drawString(ctrl.text, ctrl.x, ctrl.y); } }