misc/hats_js_anim.xhtml
changeset 15562 799fd0a6d3bf
parent 15561 3c1c5ff824f7
child 15563 af4bcdbf2c8f
equal deleted inserted replaced
15561:3c1c5ff824f7 15562:799fd0a6d3bf
     6 
     6 
     7     <style type="text/css">
     7     <style type="text/css">
     8 * {padding: 0; margin: 0; }
     8 * {padding: 0; margin: 0; }
     9 body
     9 body
    10 {
    10 {
    11     background: url('https://hg.hedgewars.org/hedgewars/raw-file/tip/share/hedgewars/Data/Themes/Nature/Sky.png') fixed no-repeat bottom left;
    11     background: url('//hg.hedgewars.org/hedgewars/raw-file/tip/share/hedgewars/Data/Themes/Nature/Sky.png') fixed no-repeat bottom left;
    12     background-color: #0B203D;
    12     background-color: #0B203D;
    13     color: #FFD902;
    13     color: #FFD902;
    14     -moz-background-size: 200%;
    14     -moz-background-size: 200%;
    15     background-size: 100% 100%;
    15     background-size: 100% 100%;
    16     font-family: sans-serif;
    16     font-family: sans-serif;
    36     margin-left: 20px;
    36     margin-left: 20px;
    37     float: left;
    37     float: left;
    38     height: 32px;
    38     height: 32px;
    39     width: 32px;
    39     width: 32px;
    40     color: transparent;
    40     color: transparent;
    41     background-image: url("https://hg.hedgewars.org/hedgewars/raw-file/tip/share/hedgewars/Data/Graphics/Hedgehog/Idle.png");
    41     background-image: url("//hg.hedgewars.org/hedgewars/raw-file/tip/share/hedgewars/Data/Graphics/Hedgehog/Idle.png");
    42 }
    42 }
    43 .girder
    43 .girder
    44 {
    44 {
    45     width: 100%;
    45     width: 100%;
    46     height: 30px;
    46     height: 30px;
    47     clear: left;
    47     clear: left;
    48     background-image: url('https://hg.hedgewars.org/hedgewars/raw-file/tip/share/hedgewars/Data/Themes/Nature/Girder.png');
    48     background-image: url('//hg.hedgewars.org/hedgewars/raw-file/tip/share/hedgewars/Data/Themes/Nature/Girder.png');
    49     background-repeat: repeat-x;
    49     background-repeat: repeat-x;
    50 }
    50 }
    51 .hide { visibility: hidden; }
    51 .hide { visibility: hidden; }
    52 a div
    52 a div
    53 {
    53 {
   166         }
   166         }
   167         var h = document.body.appendChild(a.cloneNode(true));
   167         var h = document.body.appendChild(a.cloneNode(true));
   168         if (IS_LOCAL)
   168         if (IS_LOCAL)
   169             h.href = "../share/hedgewars/Data/Graphics/Hats/"+masks[i]+".png";
   169             h.href = "../share/hedgewars/Data/Graphics/Hats/"+masks[i]+".png";
   170         else
   170         else
   171             h.href = "https://hg.hedgewars.org/hedgewars/raw-file/tip/share/hedgewars/Data/Graphics/Hats/"+masks[i]+".png";
   171             h.href = "//hg.hedgewars.org/hedgewars/raw-file/tip/share/hedgewars/Data/Graphics/Hats/"+masks[i]+".png";
   172 
   172 
   173         img = new Image();
   173         img = new Image();
   174         img.onload = function() {
   174         img.onload = function() {
   175             var name = this.id.substr(7);
   175             var name = this.id.substr(7);
   176             if (this.height === 32) {
   176             if (this.height === 32) {
   323 // Select theme according to drop-down list value
   323 // Select theme according to drop-down list value
   324 function switchTheme()
   324 function switchTheme()
   325 {
   325 {
   326     var prefix;
   326     var prefix;
   327     if (IS_LOCAL)
   327     if (IS_LOCAL)
   328         prefix = "https://hg.hedgewars.org/hedgewars/raw-file/tip";
   328         prefix = "//hg.hedgewars.org/hedgewars/raw-file/tip";
   329     else
   329     else
   330         prefix = "..";
   330         prefix = "..";
   331     document.body.style.backgroundImage='url("'+prefix+'/share/hedgewars/Data/Themes/'+this.value+'/Sky.png")';
   331     document.body.style.backgroundImage='url("'+prefix+'/share/hedgewars/Data/Themes/'+this.value+'/Sky.png")';
   332     if (themes[this.value])
   332     if (themes[this.value])
   333         girder.style.backgroundImage='url("'+prefix+'/share/hedgewars/Data/Themes/'+this.value+'/Girder.png")';
   333         girder.style.backgroundImage='url("'+prefix+'/share/hedgewars/Data/Themes/'+this.value+'/Girder.png")';