This commit is contained in:
parent
26bc8162f5
commit
e8e21c3e39
130
game/game.js
130
game/game.js
|
@ -1347,6 +1347,68 @@
|
||||||
var style=ui.css.hp_style;
|
var style=ui.css.hp_style;
|
||||||
ui.css.hp_style=lib.init.css(lib.assetURL+'theme/style/hp',lib.config.hp_style);
|
ui.css.hp_style=lib.init.css(lib.assetURL+'theme/style/hp',lib.config.hp_style);
|
||||||
style.remove();
|
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,
|
unfrequent:true,
|
||||||
},
|
},
|
||||||
|
@ -5766,17 +5828,63 @@
|
||||||
ui.css.cardback_stylesheet.remove();
|
ui.css.cardback_stylesheet.remove();
|
||||||
}
|
}
|
||||||
ui.css.cardback_stylesheet=lib.init.sheet('.card:empty,.card.infohidden{background-image:url('+fileLoadedEvent.target.result+')}');
|
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;
|
fileReader.readAsDataURL(fileToLoad, "UTF-8");
|
||||||
var fileReader = new FileReader();
|
});
|
||||||
fileReader.onload = function(fileLoadedEvent){
|
game.getDB('image','cardback_style2',function(fileToLoad){
|
||||||
if(ui.css.cardback_stylesheet2){
|
if(!fileToLoad) return;
|
||||||
ui.css.cardback_stylesheet2.remove();
|
var fileReader = new FileReader();
|
||||||
}
|
fileReader.onload = function(fileLoadedEvent){
|
||||||
ui.css.cardback_stylesheet2=lib.init.sheet('.card.infohidden:not(.infoflip){background-image:url('+fileLoadedEvent.target.result+')}');
|
if(ui.css.cardback_stylesheet2){
|
||||||
};
|
ui.css.cardback_stylesheet2.remove();
|
||||||
fileReader.readAsDataURL(fileToLoad, "UTF-8");
|
}
|
||||||
});
|
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");
|
fileReader.readAsDataURL(fileToLoad, "UTF-8");
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
-webkit-filter:none;
|
-webkit-filter:none;
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
.hp:not(.text):not(.actcount)[data-condition="mid"]>div:not(.lost){
|
.hp:not(.text):not(.actcount)[data-condition="mid"]>div:not(.lost){
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
@ -11,6 +12,7 @@
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
-webkit-filter:none;
|
-webkit-filter:none;
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
.hp:not(.text):not(.actcount)[data-condition="low"]>div:not(.lost){
|
.hp:not(.text):not(.actcount)[data-condition="low"]>div:not(.lost){
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
@ -18,12 +20,14 @@
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
-webkit-filter:none;
|
-webkit-filter:none;
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
.hp:not(.text):not(.actcount)>.lost{
|
.hp:not(.text):not(.actcount)>.lost{
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border: none;
|
border: none;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#arena.oldlayout .player .hp:not(.text):not(.actcount)[data-condition="high"]>div:not(.lost){
|
#arena.oldlayout .player .hp:not(.text):not(.actcount)[data-condition="high"]>div:not(.lost){
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
/*default*/
|
|
@ -5,6 +5,7 @@
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
-webkit-filter:brightness(0.8) contrast(1.5);
|
-webkit-filter:brightness(0.8) contrast(1.5);
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
.hp:not(.text):not(.actcount)[data-condition="mid"]>div:not(.lost){
|
.hp:not(.text):not(.actcount)[data-condition="mid"]>div:not(.lost){
|
||||||
background: url('image/emotion2.png');
|
background: url('image/emotion2.png');
|
||||||
|
@ -13,6 +14,7 @@
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
-webkit-filter:brightness(0.8) contrast(1.5);
|
-webkit-filter:brightness(0.8) contrast(1.5);
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
.hp:not(.text):not(.actcount)[data-condition="low"]>div:not(.lost){
|
.hp:not(.text):not(.actcount)[data-condition="low"]>div:not(.lost){
|
||||||
background: url('image/emotion3.png');
|
background: url('image/emotion3.png');
|
||||||
|
@ -21,6 +23,7 @@
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
-webkit-filter:brightness(0.8) contrast(1.5);
|
-webkit-filter:brightness(0.8) contrast(1.5);
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
.hp:not(.text):not(.actcount)>.lost{
|
.hp:not(.text):not(.actcount)>.lost{
|
||||||
background: url('image/emotion4.png');
|
background: url('image/emotion4.png');
|
||||||
|
@ -28,6 +31,7 @@
|
||||||
border: none;
|
border: none;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#arena.oldlayout .player .hp:not(.text):not(.actcount)[data-condition="high"]>div:not(.lost){
|
#arena.oldlayout .player .hp:not(.text):not(.actcount)[data-condition="high"]>div:not(.lost){
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
-webkit-filter:none;
|
-webkit-filter:none;
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
.hp:not(.text):not(.actcount)[data-condition="mid"]>div:not(.lost){
|
.hp:not(.text):not(.actcount)[data-condition="mid"]>div:not(.lost){
|
||||||
background: url('image/glass2.png');
|
background: url('image/glass2.png');
|
||||||
|
@ -13,6 +14,7 @@
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
-webkit-filter:none;
|
-webkit-filter:none;
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
.hp:not(.text):not(.actcount)[data-condition="low"]>div:not(.lost){
|
.hp:not(.text):not(.actcount)[data-condition="low"]>div:not(.lost){
|
||||||
background: url('image/glass3.png');
|
background: url('image/glass3.png');
|
||||||
|
@ -21,6 +23,7 @@
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
-webkit-filter:none;
|
-webkit-filter:none;
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
.hp:not(.text):not(.actcount)>.lost{
|
.hp:not(.text):not(.actcount)>.lost{
|
||||||
background: url('image/glass4.png');
|
background: url('image/glass4.png');
|
||||||
|
@ -28,6 +31,7 @@
|
||||||
border: none;
|
border: none;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#arena.oldlayout .player .hp:not(.text):not(.actcount)[data-condition="high"]>div:not(.lost){
|
#arena.oldlayout .player .hp:not(.text):not(.actcount)[data-condition="high"]>div:not(.lost){
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
border: none;
|
border: none;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
.hp:not(.text):not(.actcount)[data-condition="mid"]>div:not(.lost){
|
.hp:not(.text):not(.actcount)[data-condition="mid"]>div:not(.lost){
|
||||||
background: url('image/official2.png');
|
background: url('image/official2.png');
|
||||||
|
@ -11,6 +12,7 @@
|
||||||
border: none;
|
border: none;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
.hp:not(.text):not(.actcount)[data-condition="low"]>div:not(.lost){
|
.hp:not(.text):not(.actcount)[data-condition="low"]>div:not(.lost){
|
||||||
background: url('image/official3.png');
|
background: url('image/official3.png');
|
||||||
|
@ -18,6 +20,7 @@
|
||||||
border: none;
|
border: none;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
.hp:not(.text):not(.actcount)>.lost{
|
.hp:not(.text):not(.actcount)>.lost{
|
||||||
background: url('image/official4.png');
|
background: url('image/official4.png');
|
||||||
|
@ -25,6 +28,7 @@
|
||||||
border: none;
|
border: none;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
transform: scale(1.4) rotate(180deg);
|
transform: scale(1.4) rotate(180deg);
|
||||||
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#arena.oldlayout .player .hp:not(.text):not(.actcount)[data-condition="high"]>div:not(.lost){
|
#arena.oldlayout .player .hp:not(.text):not(.actcount)[data-condition="high"]>div:not(.lost){
|
||||||
|
|
Loading…
Reference in New Issue