summaryrefslogtreecommitdiff
path: root/boot.js
diff options
context:
space:
mode:
Diffstat (limited to 'boot.js')
-rw-r--r--boot.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/boot.js b/boot.js
index b9e8fe1..b30e95b 100644
--- a/boot.js
+++ b/boot.js
@@ -78,6 +78,9 @@ async function load() {
}
},
event: {
+ preventDefault(event) {
+ event.preventDefault();
+ },
keyboardCode(event) {
return event.code;
}
@@ -89,12 +92,18 @@ async function load() {
setFillColor(context, color) {
context.fillStyle = color;
},
+ setFont(context, font) {
+ context.font = font;
+ },
clearRect(context, x, y, w, h) {
context.clearRect(x, y, w, h);
},
fillRect(context, x, y, w, h) {
context.fillRect(x, y, w, h);
},
+ fillText(context, text, x, y) {
+ context.fillText(text, x, y);
+ },
drawImage(context, image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight) {
context.drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight);
},