https://pvzm.net/ to play [Read-only GitHub mirror] pvzm.net
modded vs pvz plants-vs-zombies plantsvszombies javascript online zombie noads jspvz pvzm game plants plant
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

make zombie chooser clearer

Clay 7e7900a3 d4d99b15

+25 -5
+9
game/Custom.css
··· 1349 1349 #dSelectCard.zombies { 1350 1350 background: url("images/interface/ZombieChooser_Background.png") no-repeat; 1351 1351 } 1352 + #dSelectCard.zombies .span1 .zombie-check { 1353 + position: absolute; 1354 + top: 1px; 1355 + right: 1px; 1356 + z-index: 2; 1357 + margin: 0; 1358 + cursor: url(images/interface/Pointer.cur), pointer; 1359 + pointer-events: auto; 1360 + } 1352 1361 #dSelectCard.zombies #btnOK, 1353 1362 #dSelectCard.zombies #btnReset { 1354 1363 color: #00f500 !important;
+16 -5
game/level/izombieleveleditor.js
··· 179 179 ViewCardTitle(card, event, false, false); 180 180 }; 181 181 div.onclick = function () { 182 + const cb = this.querySelector(".zombie-check"); 183 + const grayTargets = this.querySelectorAll("img, .span2"); 182 184 if (oS.ChosenZombies.includes(card)) { 183 185 if (oS.ChosenZombies.length > 1) { 184 186 oS.ChosenZombies = oS.ChosenZombies.filter((z) => z !== card); 185 - this.style.filter = "none"; 187 + grayTargets.forEach((el) => el.style.filter = "none"); 188 + if (cb) cb.checked = false; 186 189 PlaySound2("tap"); 187 190 } 188 191 } else { 189 192 oS.ChosenZombies.push(card); 190 - this.style.filter = "grayscale(100%)"; 193 + grayTargets.forEach((el) => el.style.filter = "grayscale(100%)"); 194 + if (cb) cb.checked = true; 191 195 PlaySound2("tap"); 192 196 } 193 197 }; 194 198 195 - if (oS.ChosenZombies.includes(card)) { 196 - div.style.filter = "grayscale(100%)"; 197 - } 199 + const isSelected = oS.ChosenZombies.includes(card); 200 + 201 + const checkbox = document.createElement("input"); 202 + checkbox.type = "checkbox"; 203 + checkbox.className = "zombie-check"; 204 + checkbox.checked = isSelected; 205 + checkbox.onclick = function (e) { e.stopPropagation(); div.click(); }; 206 + div.appendChild(checkbox); 198 207 199 208 const img = document.createElement("img"); 200 209 img.src = proto.PicArr[0]; 210 + if (isSelected) img.style.filter = "grayscale(100%)"; 201 211 div.appendChild(img); 202 212 203 213 const span = document.createElement("span"); 204 214 span.className = "span2"; 205 215 span.textContent = proto.SunNum; 216 + if (isSelected) span.style.filter = "grayscale(100%)"; 206 217 div.appendChild(span); 207 218 208 219 container.appendChild(div);