mirror of https://github.com/espruino/BangleApps
ctrlpad: fix colour types
parent
3aef2c2663
commit
c698048224
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue