Skip to content

Commit ecf8f5e

Browse files
committed
Fix button
1 parent c3a2f71 commit ecf8f5e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/main.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2449,8 +2449,18 @@ muteButtonElement.style.zIndex = "1000";
24492449
muteButtonElement.style.cursor = "pointer";
24502450
muteButtonElement.style.textShadow =
24512451
"0 0 10px #00ff40, 0 0 20px #00ff40, 0 0 40px #00ff40, 0 0 80px #00ff40";
2452+
muteButtonElement.style.userSelect = "none"; // Prevent text selection
2453+
muteButtonElement.style.webkitUserSelect = "none"; // Safari
2454+
muteButtonElement.style.touchAction = "manipulation"; // Improve touch responsiveness
24522455
muteButtonElement.textContent = isMuted ? "SOUND OFF" : "SOUND ON";
2456+
24532457
muteButtonElement.addEventListener("click", toggleMute);
2458+
muteButtonElement.addEventListener("touchstart", (e) => {
2459+
e.stopPropagation(); // Prevent game touch handling
2460+
e.preventDefault();
2461+
toggleMute();
2462+
}, { passive: false });
2463+
24542464
document.body.appendChild(muteButtonElement);
24552465

24562466
// Add UI for LGTM 2025 text
@@ -2648,7 +2658,7 @@ function updateResponsiveUI() {
26482658
}
26492659

26502660
if (lgtmElement) {
2651-
lgtmElement.style.bottom = `${spacing}px`;
2661+
lgtmElement.style.bottom = `${spacing * 0.8}px`;
26522662
lgtmElement.style.right = `${spacing}px`;
26532663
}
26542664

0 commit comments

Comments
 (0)