--- a/misc/graves_js_anim.xhtml Tue Aug 22 22:19:28 2023 +0200
+++ b/misc/graves_js_anim.xhtml Thu Aug 24 20:12:28 2023 +0200
@@ -183,7 +183,6 @@
h.href = "//hg.hedgewars.org/hedgewars/raw-file/tip/share/hedgewars/Data/Graphics/Graves/"+graves[i]+".png";
h.lastChild.style.backgroundImage = 'url("'+h.href+'")';
- h.lastChild.lastChild.data = graves[i];
h.title = graves[i];
h.idle = Math.floor(Math.random()*16);
if (j%8 === 7 || i === graves.length-1)
@@ -227,7 +226,7 @@
form.appendChild(chk);
label = document.createElement("label");
label.htmlFor = "anim";
- label.appendChild(document.createTextNode("Animate graves"));
+ label.appendChild(document.createTextNode(" Animate graves"));
form.appendChild(label);
form.appendChild(document.createElement("br"));
@@ -241,12 +240,12 @@
form.appendChild(chk);
label = document.createElement("label");
label.htmlFor = "hide_girders";
- label.appendChild(document.createTextNode("Show girders"));
+ label.appendChild(document.createTextNode(" Show girders"));
form.appendChild(label);
document.body.appendChild(form);
-
+ switchTheme();
}
function animateGraves()
@@ -300,9 +299,10 @@
prefix = "//hg.hedgewars.org/hedgewars/raw-file/tip";
else
prefix = "..";
- document.body.style.backgroundImage='url("'+prefix+'/share/hedgewars/Data/Themes/'+this.value+'/Sky.png")';
- if (themes[this.value])
- girder.style.backgroundImage='url("'+prefix+'/share/hedgewars/Data/Themes/'+this.value+'/Girder.png")';
+ var theme = this.value || "Nature";
+ document.body.style.backgroundImage='url("'+prefix+'/share/hedgewars/Data/Themes/'+theme+'/Sky.png")';
+ if (themes[theme])
+ girder.style.backgroundImage='url("'+prefix+'/share/hedgewars/Data/Themes/'+theme+'/Girder.png")';
else
girder.style.backgroundImage='url("'+prefix+'/share/hedgewars/Data/Graphics/Girder.png")';
}