fix(common): wrong text color and use new AtlasImage type
This commit is contained in:
@@ -25,13 +25,12 @@ const A_BUTTON: Rect = [144, 172, BUTTON_WIDTH, BUTTON_HEIGHT];
|
|||||||
onRender((ctx) => {
|
onRender((ctx) => {
|
||||||
ctx.globalAlpha = props.opacity ?? 1;
|
ctx.globalAlpha = props.opacity ?? 1;
|
||||||
ctx.font = "10px NDS10";
|
ctx.font = "10px NDS10";
|
||||||
|
ctx.fillStyle = "#010101";
|
||||||
|
|
||||||
ctx.translate(0, props.yOffset);
|
ctx.translate(0, props.yOffset);
|
||||||
|
|
||||||
const drawButton = (
|
const drawButton = (
|
||||||
image: {
|
image: AtlasImage,
|
||||||
draw: (ctx: CanvasRenderingContext2D, x: number, y: number) => void;
|
|
||||||
},
|
|
||||||
text: string,
|
text: string,
|
||||||
x: number,
|
x: number,
|
||||||
offset: number,
|
offset: number,
|
||||||
|
|||||||
Reference in New Issue
Block a user