diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2025-04-05 17:27:22 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2025-04-05 17:27:22 +0100 |
commit | d36583ad6ae53708f1ae11bb7e4f4939e6ac3b4d (patch) | |
tree | b56533e4bdb81864e80771e1a3a2e16347328684 /src/index.html.in | |
parent | fa9bffcc842eb5973829d46436d3435993de9510 (diff) | |
download | ldjam57-d36583ad6ae53708f1ae11bb7e4f4939e6ac3b4d.tar |
allow cloning blues
Diffstat (limited to 'src/index.html.in')
-rw-r--r-- | src/index.html.in | 7 |
1 files changed, 7 insertions, 0 deletions
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()); |