From 9ccdd7f4e59cf91d1be1a0a094e12f7c96a47671 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 12 Mar 2021 15:56:25 -0500 Subject: [PATCH] unify checkboxes in bladeburner --- src/Bladeburner.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/Bladeburner.js b/src/Bladeburner.js index 1bf218f20..10b6dae41 100644 --- a/src/Bladeburner.js +++ b/src/Bladeburner.js @@ -2575,11 +2575,10 @@ Bladeburner.prototype.updateContractsUIElement = function(el, action) { el.appendChild(createElement("br")); var autolevelCheckboxId = "bladeburner-" + action.name + "-autolevel-checkbox"; el.appendChild(createElement("label", { - for:autolevelCheckboxId, innerText:"Autolevel",color:"white", + for:autolevelCheckboxId, innerText:"Autolevel: ",color:"white", tooltip:"Automatically increase contract level when possible" })); - const checkboxDiv = createElement("div", { class: "bbcheckbox" }); const checkboxInput = createElement("input", { type:"checkbox", id: autolevelCheckboxId, @@ -2588,11 +2587,8 @@ Bladeburner.prototype.updateContractsUIElement = function(el, action) { action.autoLevel = checkboxInput.checked; }, }); - const checkmarkLabel = createElement("label", { for: autolevelCheckboxId }); - checkboxDiv.appendChild(checkboxInput); - checkboxDiv.appendChild(checkmarkLabel); - el.appendChild(checkboxDiv); + el.appendChild(checkboxInput); } Bladeburner.prototype.updateOperationsUIElement = function(el, action) { @@ -2718,11 +2714,10 @@ Bladeburner.prototype.updateOperationsUIElement = function(el, action) { el.appendChild(createElement("br")); var autolevelCheckboxId = "bladeburner-" + action.name + "-autolevel-checkbox"; el.appendChild(createElement("label", { - for:autolevelCheckboxId, innerText:"Autolevel",color:"white", + for:autolevelCheckboxId, innerText:"Autolevel: ",color:"white", tooltip:"Automatically increase operation level when possible" })); - const checkboxDiv = createElement("div", { class: "bbcheckbox" }); const checkboxInput = createElement("input", { type:"checkbox", id: autolevelCheckboxId, @@ -2731,11 +2726,8 @@ Bladeburner.prototype.updateOperationsUIElement = function(el, action) { action.autoLevel = checkboxInput.checked; }, }); - const checkmarkLabel = createElement("label", { for: autolevelCheckboxId }); - checkboxDiv.appendChild(checkboxInput); - checkboxDiv.appendChild(checkmarkLabel); - el.appendChild(checkboxDiv); + el.appendChild(checkboxInput); } Bladeburner.prototype.updateBlackOpsUIElement = function(el, action) {