tmp
This commit is contained in:
parent
b45b268097
commit
7a7b5347f1
93
game/game.js
93
game/game.js
|
@ -943,8 +943,7 @@
|
|||
item:{
|
||||
'收藏':'收藏',
|
||||
'最近':'最近',
|
||||
// '自创':'自创',
|
||||
all:'全部'
|
||||
'all':'全部'
|
||||
},
|
||||
unfrequent:true,
|
||||
},
|
||||
|
@ -27458,15 +27457,15 @@
|
|||
characterDialog2:function(filter){
|
||||
var list=[];
|
||||
for(var i in lib.character){
|
||||
if(lib.character[i][4].contains('minskin')) continue;
|
||||
if(lib.character[i][4].contains('boss')||lib.character[i][4].contains('hiddenboss')){
|
||||
if(lib.config.mode=='boss') continue;
|
||||
if(!lib.character[i][4].contains('bossallowed')) continue;
|
||||
}
|
||||
if(lib.character[i][4].contains('minskin')) continue;
|
||||
if(lib.character[i][4].contains('boss')||lib.character[i][4].contains('hiddenboss')){
|
||||
if(lib.config.mode=='boss') continue;
|
||||
if(!lib.character[i][4].contains('bossallowed')) continue;
|
||||
}
|
||||
|
||||
if(lib.character[i][4].contains('stonehidden')) continue;
|
||||
if(lib.config.banned.contains(i)) continue;
|
||||
if(filter&&filter(i)) continue;
|
||||
if(lib.character[i][4].contains('stonehidden')) continue;
|
||||
if(lib.config.banned.contains(i)) continue;
|
||||
if(filter&&filter(i)) continue;
|
||||
list.push(i);
|
||||
}
|
||||
var dialog=ui.create.dialog('hidden');
|
||||
|
@ -27475,7 +27474,8 @@
|
|||
dialog.classList.add('scroll2');
|
||||
dialog.classList.add('scroll3');
|
||||
list.sort(lib.sort.character);
|
||||
dialog.classList.add('character');
|
||||
dialog.classList.add('character');
|
||||
dialog.classList.add('choose-character');
|
||||
var getPack=function(name){
|
||||
for(var i in lib.characterPack){
|
||||
if(lib.characterPack[i][name]) return i;
|
||||
|
@ -27483,82 +27483,63 @@
|
|||
return null;
|
||||
}
|
||||
var packs={};
|
||||
for(var i=0;i<list.length;i++){
|
||||
var pack=getPack(list[i]);
|
||||
if(pack){
|
||||
if(!packs[pack]){
|
||||
packs[pack]=[];
|
||||
}
|
||||
packs[pack].push(list[i]);
|
||||
}
|
||||
}
|
||||
var packnode=ui.create.div('.packnode',dialog);
|
||||
lib.setScroll(packnode);
|
||||
var clickCapt=function(){
|
||||
var active=this.parentNode.querySelector('.active');
|
||||
if(active){
|
||||
active.buttonnode.remove();
|
||||
active.classList.remove('active');
|
||||
}
|
||||
this.classList.add('active');
|
||||
dialog.content.appendChild(this.buttonnode);
|
||||
dialog.buttons=this.buttons;
|
||||
game.uncheck();
|
||||
game.check();
|
||||
for(var i=0;i<dialog.buttons.length;i++){
|
||||
if(this.pack&&!this.pack.contains(dialog.buttons[i].link)){
|
||||
dialog.buttons[i].classList.add('nodisplay');
|
||||
}
|
||||
else{
|
||||
dialog.buttons[i].classList.remove('nodisplay');
|
||||
}
|
||||
}
|
||||
}
|
||||
var createNode=function(packname){
|
||||
var translate;
|
||||
if(packname=='custom'){
|
||||
translate='自定义';
|
||||
var pack=null;
|
||||
if(packname=='最近'){
|
||||
pack=lib.config.recentCharacter;
|
||||
}
|
||||
else if(packname=='recent'){
|
||||
translate='最近';
|
||||
packs[packname]=lib.config.recentCharacter;
|
||||
else if(packname=='收藏'){
|
||||
pack=lib.config.favouriteCharacter;
|
||||
}
|
||||
else if(packname=='favourite'){
|
||||
translate='收藏';
|
||||
packs[packname]=lib.config.favouriteCharacter;
|
||||
packs[packname].sort(lib.sort.character);
|
||||
}
|
||||
else{
|
||||
translate=lib.translate[packname+'_character_config'];
|
||||
}
|
||||
var node=ui.create.div('.dialogbutton.menubutton.large',translate,packnode,clickCapt);
|
||||
node.buttonnode=ui.create.div('.buttons');
|
||||
node.buttons=ui.create.buttons(packs[packname],'character',node.buttonnode);
|
||||
var node=ui.create.div('.dialogbutton.menubutton.large',packname,packnode,clickCapt);
|
||||
node.pack=pack;
|
||||
return node;
|
||||
}
|
||||
dialog.add([list,'character']);
|
||||
var bool=true;
|
||||
var node;
|
||||
if(lib.config.recentCharacter.length){
|
||||
var node=createNode('recent');
|
||||
node=createNode('最近');
|
||||
if(lib.config.character_dialog_tool=='最近'){
|
||||
clickCapt.call(node);
|
||||
bool=false;
|
||||
}
|
||||
}
|
||||
if(lib.config.favouriteCharacter.length){
|
||||
var node=createNode('favourite');
|
||||
node=createNode('收藏');
|
||||
if(lib.config.character_dialog_tool=='收藏'){
|
||||
clickCapt.call(node);
|
||||
bool=false;
|
||||
}
|
||||
}
|
||||
if(packs.custom){
|
||||
var node=createNode('custom');
|
||||
if(lib.config.character_dialog_tool=='自创'){
|
||||
clickCapt.call(node);
|
||||
bool=false;
|
||||
}
|
||||
}
|
||||
for(var i=0;i<lib.config.all.characters.length;i++){
|
||||
var packname=lib.config.all.characters[i];
|
||||
if(packs[packname]){
|
||||
createNode(packname);
|
||||
}
|
||||
}
|
||||
var node=createNode('全部');
|
||||
if(lib.config.character_dialog_tool=='all'){
|
||||
clickCapt.call(node);
|
||||
bool=false;
|
||||
}
|
||||
if(bool){
|
||||
clickCapt.call(packnode.firstChild);
|
||||
}
|
||||
|
||||
var node=ui.create.div('.dialogbutton.menubutton.large','筛选',packnode);
|
||||
return dialog;
|
||||
},
|
||||
characterDialog:function(){
|
||||
|
|
|
@ -717,6 +717,13 @@ table{table-layout: fixed;}
|
|||
position: absolute;
|
||||
overflow: scroll;
|
||||
}
|
||||
.dialog.choose-character>.content-container{
|
||||
width: calc(100% - 106px);
|
||||
left: 106px;
|
||||
}
|
||||
.dialog.choose-character>.packnode{
|
||||
width: 106px;
|
||||
}
|
||||
.dialog.character>.packnode>div{
|
||||
/*box-shadow: rgba(0, 0, 0, 0.4) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 3px 10px;
|
||||
background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4));
|
||||
|
|
|
@ -9,6 +9,17 @@ html{
|
|||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.dialog.choose-character>.packnode>div{
|
||||
box-shadow: rgba(0, 0, 0, 0.4) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 3px 10px;
|
||||
background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4));
|
||||
color: white;
|
||||
text-shadow: black 0 0 2px;
|
||||
}
|
||||
.dialog.choose-character>.packnode>div.active{
|
||||
box-shadow: rgba(27, 63, 95, 0.8) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 3px 10px !important;
|
||||
background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1));
|
||||
}
|
||||
|
||||
.button-downloading>.button-progress{
|
||||
background: rgba(77,224,100,0.45);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue