From 7bbc48f01170c3510860d2f8ef33a3564a75acf3 Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Thu, 22 May 2025 12:34:46 -0400 Subject: [PATCH] . --- index.html | 33 ++++++++++++++++++++++++++------- style.css | 8 ++++++-- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 7535a5d7..4e8dcf58 100644 --- a/index.html +++ b/index.html @@ -16230,10 +16230,25 @@ behaviorRules = { } function resetPrompt() { if (settings.resetwarning === 0 || currentPixels.length===0) { autoResizeCanvas(); focusGame(); return } - promptConfirm("Are you sure you want to clear the whole scene?",(r) => { - if (r) autoResizeCanvas(); - focusGame(); - },"Clear Canvas") + let pause = false; + if (promptState) { pause = promptState.wasPaused } + else if (paused) { pause = true } + promptState = { + text: "Are you sure you want to clear the whole scene?", + title: "Clear Canvas", + handler: (r) => { + if (r) autoResizeCanvas(); + focusGame(); + }, + html: standalone ? null : `

`, + type: "confirm", + wasPaused: pause + } + showPromptScreen(); + // promptConfirm("Are you sure you want to clear the whole scene?",(r) => { + // if (r) autoResizeCanvas(); + // focusGame(); + // },"Clear Canvas") } function tpsPrompt() { promptInput("Enter the new simulation Ticks Per Second (TPS) between 1 and 1000. This is how many updates per second the simulation will run.\n\nThe default is 30.\n\nThe current TPS is " + tps + ".", @@ -17602,6 +17617,9 @@ for (var k = 0; k < b0.split(" AND ").length; k++) { menuTitle.style.color = promptState.titleColor || "unset"; var promptMenuText = document.getElementById("promptMenuText"); promptMenuText.innerText = promptState.text || ""; + if (promptState.html) { + promptMenuText.insertAdjacentHTML("beforeend",promptState.html); + } let promptOK = document.getElementById("promptOK"); let promptCancel = document.getElementById("promptCancel"); let promptConfirm = document.getElementById("promptConfirm"); @@ -19063,7 +19081,9 @@ Cancer, Landmine, Grenade, Smoke Grenade">? -

+ + +