Back to shtanton's homepage
summaryrefslogtreecommitdiff
path: root/src/index.html.in
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2025-04-05 17:27:22 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2025-04-05 17:27:22 +0100
commitd36583ad6ae53708f1ae11bb7e4f4939e6ac3b4d (patch)
treeb56533e4bdb81864e80771e1a3a2e16347328684 /src/index.html.in
parentfa9bffcc842eb5973829d46436d3435993de9510 (diff)
downloadldjam57-d36583ad6ae53708f1ae11bb7e4f4939e6ac3b4d.tar
allow cloning blues
Diffstat (limited to 'src/index.html.in')
-rw-r--r--src/index.html.in7
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());