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