ctrlpad: fix colour types

pull/3383/head
Rob Pilling 2024-04-25 12:46:19 +01:00
parent 3aef2c2663
commit c698048224
1 changed files with 5 additions and 5 deletions

View File

@ -69,8 +69,8 @@
type Control = { type Control = {
x: number, x: number,
y: number, y: number,
fg: string, //ColorResolvable, TODO fg: ColorResolvable,
bg: string, //ColorResolvable, bg: ColorResolvable,
text: string, text: string,
}; };
@ -83,7 +83,7 @@
fg: "#000", fg: "#000",
bg: "#bbb", bg: "#bbb",
}, },
}; } as const;
class Controls { class Controls {
controls: [Control, Control, Control, Control, Control]; controls: [Control, Control, Control, Control, Control];
@ -122,9 +122,9 @@
for(const ctrl of single ? [single] : this.controls){ for(const ctrl of single ? [single] : this.controls){
g g
.setColor(ctrl.bg as any) // FIXME .setColor(ctrl.bg)
.fillCircle(ctrl.x, ctrl.y, 23) .fillCircle(ctrl.x, ctrl.y, 23)
.setColor(ctrl.fg as any) // FIXME .setColor(ctrl.fg)
.drawString(ctrl.text, ctrl.x, ctrl.y); .drawString(ctrl.text, ctrl.x, ctrl.y);
} }
} }