Add non-working menu buttons

This commit is contained in:
asraelite 2018-03-02 19:56:29 +00:00
parent 435b24cb6a
commit 6223b35536
6 changed files with 43 additions and 9 deletions

View file

@ -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);
}