equal
deleted
inserted
replaced
181 h.href = "../share/hedgewars/Data/Graphics/Graves/"+graves[i]+".png"; |
181 h.href = "../share/hedgewars/Data/Graphics/Graves/"+graves[i]+".png"; |
182 else |
182 else |
183 h.href = "//hg.hedgewars.org/hedgewars/raw-file/tip/share/hedgewars/Data/Graphics/Graves/"+graves[i]+".png"; |
183 h.href = "//hg.hedgewars.org/hedgewars/raw-file/tip/share/hedgewars/Data/Graphics/Graves/"+graves[i]+".png"; |
184 |
184 |
185 h.lastChild.style.backgroundImage = 'url("'+h.href+'")'; |
185 h.lastChild.style.backgroundImage = 'url("'+h.href+'")'; |
186 h.lastChild.lastChild.data = graves[i]; |
|
187 h.title = graves[i]; |
186 h.title = graves[i]; |
188 h.idle = Math.floor(Math.random()*16); |
187 h.idle = Math.floor(Math.random()*16); |
189 if (j%8 === 7 || i === graves.length-1) |
188 if (j%8 === 7 || i === graves.length-1) |
190 document.body.appendChild(g.cloneNode(false)); |
189 document.body.appendChild(g.cloneNode(false)); |
191 j++; |
190 j++; |
225 chk.onclick = switchAnim; |
224 chk.onclick = switchAnim; |
226 chk.checked = true; |
225 chk.checked = true; |
227 form.appendChild(chk); |
226 form.appendChild(chk); |
228 label = document.createElement("label"); |
227 label = document.createElement("label"); |
229 label.htmlFor = "anim"; |
228 label.htmlFor = "anim"; |
230 label.appendChild(document.createTextNode("Animate graves")); |
229 label.appendChild(document.createTextNode(" Animate graves")); |
231 form.appendChild(label); |
230 form.appendChild(label); |
232 |
231 |
233 form.appendChild(document.createElement("br")); |
232 form.appendChild(document.createElement("br")); |
234 |
233 |
235 // Checkbox: Hide girders |
234 // Checkbox: Hide girders |
239 chk.onclick = hideGirders; |
238 chk.onclick = hideGirders; |
240 chk.checked = true; |
239 chk.checked = true; |
241 form.appendChild(chk); |
240 form.appendChild(chk); |
242 label = document.createElement("label"); |
241 label = document.createElement("label"); |
243 label.htmlFor = "hide_girders"; |
242 label.htmlFor = "hide_girders"; |
244 label.appendChild(document.createTextNode("Show girders")); |
243 label.appendChild(document.createTextNode(" Show girders")); |
245 form.appendChild(label); |
244 form.appendChild(label); |
246 |
245 |
247 document.body.appendChild(form); |
246 document.body.appendChild(form); |
248 |
247 |
249 |
248 switchTheme(); |
250 } |
249 } |
251 |
250 |
252 function animateGraves() |
251 function animateGraves() |
253 { |
252 { |
254 var a = document.getElementsByTagName("a"); |
253 var a = document.getElementsByTagName("a"); |
298 var prefix; |
297 var prefix; |
299 if (!IS_LOCAL) |
298 if (!IS_LOCAL) |
300 prefix = "//hg.hedgewars.org/hedgewars/raw-file/tip"; |
299 prefix = "//hg.hedgewars.org/hedgewars/raw-file/tip"; |
301 else |
300 else |
302 prefix = ".."; |
301 prefix = ".."; |
303 document.body.style.backgroundImage='url("'+prefix+'/share/hedgewars/Data/Themes/'+this.value+'/Sky.png")'; |
302 var theme = this.value || "Nature"; |
304 if (themes[this.value]) |
303 document.body.style.backgroundImage='url("'+prefix+'/share/hedgewars/Data/Themes/'+theme+'/Sky.png")'; |
305 girder.style.backgroundImage='url("'+prefix+'/share/hedgewars/Data/Themes/'+this.value+'/Girder.png")'; |
304 if (themes[theme]) |
|
305 girder.style.backgroundImage='url("'+prefix+'/share/hedgewars/Data/Themes/'+theme+'/Girder.png")'; |
306 else |
306 else |
307 girder.style.backgroundImage='url("'+prefix+'/share/hedgewars/Data/Graphics/Girder.png")'; |
307 girder.style.backgroundImage='url("'+prefix+'/share/hedgewars/Data/Graphics/Girder.png")'; |
308 } |
308 } |
309 //]]> |
309 //]]> |
310 </script> |
310 </script> |