This commit is contained in:
libccy 2017-03-19 02:37:26 +08:00
parent 26bc8162f5
commit e8e21c3e39
6 changed files with 136 additions and 11 deletions

View File

@ -1347,6 +1347,68 @@
var style=ui.css.hp_style;
ui.css.hp_style=lib.init.css(lib.assetURL+'theme/style/hp',lib.config.hp_style);
style.remove();
if(ui.css.hp_stylesheet1){
ui.css.hp_stylesheet1.remove();
delete ui.css.hp_stylesheet1;
}
if(ui.css.hp_stylesheet2){
ui.css.hp_stylesheet2.remove();
delete ui.css.hp_stylesheet2;
}
if(ui.css.hp_stylesheet3){
ui.css.hp_stylesheet3.remove();
delete ui.css.hp_stylesheet3;
}
if(ui.css.hp_stylesheet4){
ui.css.hp_stylesheet4.remove();
delete ui.css.hp_stylesheet4;
}
if(layout=='custom'){
game.getDB('image','hp_style1',function(fileToLoad){
if(!fileToLoad) return;
var fileReader = new FileReader();
fileReader.onload = function(fileLoadedEvent){
if(ui.css.hp_stylesheet1){
ui.css.hp_stylesheet1.remove();
}
ui.css.hp_stylesheet1=lib.init.sheet('.hp:not(.text):not(.actcount)[data-condition="high"]>div:not(.lost){background-image:url('+fileLoadedEvent.target.result+')}');
};
fileReader.readAsDataURL(fileToLoad, "UTF-8");
});
game.getDB('image','hp_style2',function(fileToLoad){
if(!fileToLoad) return;
var fileReader = new FileReader();
fileReader.onload = function(fileLoadedEvent){
if(ui.css.hp_stylesheet2){
ui.css.hp_stylesheet2.remove();
}
ui.css.hp_stylesheet2=lib.init.sheet('.hp:not(.text):not(.actcount)[data-condition="mid"]>div:not(.lost){background-image:url('+fileLoadedEvent.target.result+')}');
};
fileReader.readAsDataURL(fileToLoad, "UTF-8");
});
game.getDB('image','hp_style3',function(fileToLoad){
if(!fileToLoad) return;
var fileReader = new FileReader();
fileReader.onload = function(fileLoadedEvent){
if(ui.css.hp_stylesheet3){
ui.css.hp_stylesheet3.remove();
}
ui.css.hp_stylesheet3=lib.init.sheet('.hp:not(.text):not(.actcount)[data-condition="low"]>div:not(.lost){background-image:url('+fileLoadedEvent.target.result+')}');
};
fileReader.readAsDataURL(fileToLoad, "UTF-8");
});
game.getDB('image','hp_style4',function(fileToLoad){
if(!fileToLoad) return;
var fileReader = new FileReader();
fileReader.onload = function(fileLoadedEvent){
if(ui.css.hp_stylesheet4){
ui.css.hp_stylesheet4.remove();
}
ui.css.hp_stylesheet4=lib.init.sheet('.hp:not(.text):not(.actcount)>.lost{background-image:url('+fileLoadedEvent.target.result+')}');
};
fileReader.readAsDataURL(fileToLoad, "UTF-8");
});
}
},
unfrequent:true,
},
@ -5766,17 +5828,63 @@
ui.css.cardback_stylesheet.remove();
}
ui.css.cardback_stylesheet=lib.init.sheet('.card:empty,.card.infohidden{background-image:url('+fileLoadedEvent.target.result+')}');
game.getDB('image','cardback_style2',function(fileToLoad){
if(!fileToLoad) return;
var fileReader = new FileReader();
fileReader.onload = function(fileLoadedEvent){
if(ui.css.cardback_stylesheet2){
ui.css.cardback_stylesheet2.remove();
}
ui.css.cardback_stylesheet2=lib.init.sheet('.card.infohidden:not(.infoflip){background-image:url('+fileLoadedEvent.target.result+')}');
};
fileReader.readAsDataURL(fileToLoad, "UTF-8");
});
};
fileReader.readAsDataURL(fileToLoad, "UTF-8");
});
game.getDB('image','cardback_style2',function(fileToLoad){
if(!fileToLoad) return;
var fileReader = new FileReader();
fileReader.onload = function(fileLoadedEvent){
if(ui.css.cardback_stylesheet2){
ui.css.cardback_stylesheet2.remove();
}
ui.css.cardback_stylesheet2=lib.init.sheet('.card.infohidden:not(.infoflip){background-image:url('+fileLoadedEvent.target.result+')}');
};
fileReader.readAsDataURL(fileToLoad, "UTF-8");
});
}
if(lib.config.hp_style=='custom'){
game.getDB('image','hp_style1',function(fileToLoad){
if(!fileToLoad) return;
var fileReader = new FileReader();
fileReader.onload = function(fileLoadedEvent){
if(ui.css.hp_stylesheet1){
ui.css.hp_stylesheet1.remove();
}
ui.css.hp_stylesheet1=lib.init.sheet('.hp:not(.text):not(.actcount)[data-condition="high"]>div:not(.lost){background-image:url('+fileLoadedEvent.target.result+')}');
};
fileReader.readAsDataURL(fileToLoad, "UTF-8");
});
game.getDB('image','hp_style2',function(fileToLoad){
if(!fileToLoad) return;
var fileReader = new FileReader();
fileReader.onload = function(fileLoadedEvent){
if(ui.css.hp_stylesheet2){
ui.css.hp_stylesheet2.remove();
}
ui.css.hp_stylesheet2=lib.init.sheet('.hp:not(.text):not(.actcount)[data-condition="mid"]>div:not(.lost){background-image:url('+fileLoadedEvent.target.result+')}');
};
fileReader.readAsDataURL(fileToLoad, "UTF-8");
});
game.getDB('image','hp_style3',function(fileToLoad){
if(!fileToLoad) return;
var fileReader = new FileReader();
fileReader.onload = function(fileLoadedEvent){
if(ui.css.hp_stylesheet3){
ui.css.hp_stylesheet3.remove();
}
ui.css.hp_stylesheet3=lib.init.sheet('.hp:not(.text):not(.actcount)[data-condition="low"]>div:not(.lost){background-image:url('+fileLoadedEvent.target.result+')}');
};
fileReader.readAsDataURL(fileToLoad, "UTF-8");
});
game.getDB('image','hp_style4',function(fileToLoad){
if(!fileToLoad) return;
var fileReader = new FileReader();
fileReader.onload = function(fileLoadedEvent){
if(ui.css.hp_stylesheet4){
ui.css.hp_stylesheet4.remove();
}
ui.css.hp_stylesheet4=lib.init.sheet('.hp:not(.text):not(.actcount)>.lost{background-image:url('+fileLoadedEvent.target.result+')}');
};
fileReader.readAsDataURL(fileToLoad, "UTF-8");
});

View File

@ -4,6 +4,7 @@
background-size: 100% 100%;
transform: scale(1.4) rotate(180deg);
-webkit-filter:none;
border-radius: 0px;
}
.hp:not(.text):not(.actcount)[data-condition="mid"]>div:not(.lost){
box-shadow: none;
@ -11,6 +12,7 @@
background-size: 100% 100%;
transform: scale(1.4) rotate(180deg);
-webkit-filter:none;
border-radius: 0px;
}
.hp:not(.text):not(.actcount)[data-condition="low"]>div:not(.lost){
box-shadow: none;
@ -18,12 +20,14 @@
background-size: 100% 100%;
transform: scale(1.4) rotate(180deg);
-webkit-filter:none;
border-radius: 0px;
}
.hp:not(.text):not(.actcount)>.lost{
box-shadow: none;
border: none;
background-size: 100% 100%;
transform: scale(1.4) rotate(180deg);
border-radius: 0px;
}
#arena.oldlayout .player .hp:not(.text):not(.actcount)[data-condition="high"]>div:not(.lost){

View File

@ -0,0 +1 @@
/*default*/

View File

@ -5,6 +5,7 @@
background-size: cover;
transform: scale(1.4) rotate(180deg);
-webkit-filter:brightness(0.8) contrast(1.5);
border-radius: 0px;
}
.hp:not(.text):not(.actcount)[data-condition="mid"]>div:not(.lost){
background: url('image/emotion2.png');
@ -13,6 +14,7 @@
background-size: cover;
transform: scale(1.4) rotate(180deg);
-webkit-filter:brightness(0.8) contrast(1.5);
border-radius: 0px;
}
.hp:not(.text):not(.actcount)[data-condition="low"]>div:not(.lost){
background: url('image/emotion3.png');
@ -21,6 +23,7 @@
background-size: cover;
transform: scale(1.4) rotate(180deg);
-webkit-filter:brightness(0.8) contrast(1.5);
border-radius: 0px;
}
.hp:not(.text):not(.actcount)>.lost{
background: url('image/emotion4.png');
@ -28,6 +31,7 @@
border: none;
background-size: cover;
transform: scale(1.4) rotate(180deg);
border-radius: 0px;
}
#arena.oldlayout .player .hp:not(.text):not(.actcount)[data-condition="high"]>div:not(.lost){

View File

@ -5,6 +5,7 @@
background-size: cover;
transform: scale(1.4) rotate(180deg);
-webkit-filter:none;
border-radius: 0px;
}
.hp:not(.text):not(.actcount)[data-condition="mid"]>div:not(.lost){
background: url('image/glass2.png');
@ -13,6 +14,7 @@
background-size: cover;
transform: scale(1.4) rotate(180deg);
-webkit-filter:none;
border-radius: 0px;
}
.hp:not(.text):not(.actcount)[data-condition="low"]>div:not(.lost){
background: url('image/glass3.png');
@ -21,6 +23,7 @@
background-size: cover;
transform: scale(1.4) rotate(180deg);
-webkit-filter:none;
border-radius: 0px;
}
.hp:not(.text):not(.actcount)>.lost{
background: url('image/glass4.png');
@ -28,6 +31,7 @@
border: none;
background-size: cover;
transform: scale(1.4) rotate(180deg);
border-radius: 0px;
}
#arena.oldlayout .player .hp:not(.text):not(.actcount)[data-condition="high"]>div:not(.lost){

View File

@ -4,6 +4,7 @@
border: none;
background-size: cover;
transform: scale(1.4) rotate(180deg);
border-radius: 0px;
}
.hp:not(.text):not(.actcount)[data-condition="mid"]>div:not(.lost){
background: url('image/official2.png');
@ -11,6 +12,7 @@
border: none;
background-size: cover;
transform: scale(1.4) rotate(180deg);
border-radius: 0px;
}
.hp:not(.text):not(.actcount)[data-condition="low"]>div:not(.lost){
background: url('image/official3.png');
@ -18,6 +20,7 @@
border: none;
background-size: cover;
transform: scale(1.4) rotate(180deg);
border-radius: 0px;
}
.hp:not(.text):not(.actcount)>.lost{
background: url('image/official4.png');
@ -25,6 +28,7 @@
border: none;
background-size: cover;
transform: scale(1.4) rotate(180deg);
border-radius: 0px;
}
#arena.oldlayout .player .hp:not(.text):not(.actcount)[data-condition="high"]>div:not(.lost){