From 8f54cac05765bb47488bec7242bb865a1dc1f7d4 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Fri, 4 Jul 2025 23:03:40 +1200 Subject: Add a nocursor attribute to the element This attribute hides the mouse cursor on the program canvas. --- bedrock.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bedrock.js') diff --git a/bedrock.js b/bedrock.js index 3db4372..7be6e4d 100644 --- a/bedrock.js +++ b/bedrock.js @@ -91,6 +91,7 @@ function upgradeToEmulator(element) { let options = { scale, controls: 'controls' in attr, + nocursor: 'nocursor' in attr, autoplay: true, }; let url = URL.parse(attr.src.value, window.location.href); @@ -540,6 +541,7 @@ function EmulatorElement(options) { if (options && !options.controls) emulator.hideMenuBar(); if (options && options.autoplay) emulator.runProgram(); + if (options && options.nocursor) canvas.style.cursor = 'none'; return emulator; } -- cgit v1.2.3-70-g09d2