From d36583ad6ae53708f1ae11bb7e4f4939e6ac3b4d Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Sat, 5 Apr 2025 17:27:22 +0100 Subject: allow cloning blues --- src/index.html.in | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/index.html.in') diff --git a/src/index.html.in b/src/index.html.in index 0b76295..8d0ccea 100644 --- a/src/index.html.in +++ b/src/index.html.in @@ -90,9 +90,16 @@ async function main() { const mousey = e.clientY; if (e.button == 0) { exports.game_update(INPUT_CLICK, mousex, mousey, now()); + } else if (e.button == 2) { + e.preventDefault(); + exports.game_update(INPUT_RCLICK, mousex, mousey, now()); } }); + canvas.addEventListener("contextmenu", function (e) { + e.preventDefault(); + }); + document.addEventListener("keydown", function (e) { if (e.key === " ") { exports.game_update(INPUT_PAUSE_PLAY, 0, 0, now()); -- cgit v1.2.3