Add non-working menu buttons
This commit is contained in:
parent
435b24cb6a
commit
6223b35536
6 changed files with 43 additions and 9 deletions
|
@ -1,10 +1,11 @@
|
|||
import {canvas, context} from './index.mjs';
|
||||
|
||||
export function text(string, x, y,
|
||||
{font = '52pt Arial', align = 'left', valign = 'top'}) {
|
||||
{font = '52pt Arial', align = 'left', valign = 'top', color = null}) {
|
||||
context.textAlign = align;
|
||||
context.textBaseline = valign;
|
||||
context.fillStyle = color === null ? context.fillStyle : color;
|
||||
context.font = font;
|
||||
|
||||
|
||||
context.fillText(string, x, y);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue