Merge branch 'libccy:PR-Branch' into PR-Branch
This commit is contained in:
commit
98d7aa4534
86
game/game.js
86
game/game.js
|
@ -39342,7 +39342,11 @@
|
|||
active.link.remove();
|
||||
active=this;
|
||||
this.classList.add('active');
|
||||
if(this.link) rightPane.appendChild(this.link);
|
||||
else{
|
||||
this._initLink();
|
||||
rightPane.appendChild(this.link);
|
||||
}
|
||||
if(connectMenu){
|
||||
if(updateActive) updateActive();
|
||||
if(updateActiveCard) updateActiveCard();
|
||||
|
@ -39353,6 +39357,7 @@
|
|||
var info=lib.mode[mode];
|
||||
var page=ui.create.div('');
|
||||
var node=ui.create.div('.menubutton.large',info.name,position,clickMode);
|
||||
node._initLink=function(){
|
||||
node.link=page;
|
||||
node.mode=mode;
|
||||
if(connectMenu){
|
||||
|
@ -39365,6 +39370,7 @@
|
|||
node.classList.add('active');
|
||||
}
|
||||
}
|
||||
//“更多”下的内容
|
||||
var map={};
|
||||
var infoconfig=connectMenu?info.connect:info.config;
|
||||
if(infoconfig){
|
||||
|
@ -39545,6 +39551,7 @@
|
|||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
return node;
|
||||
};
|
||||
var modeorder=lib.config.modeorder||[];
|
||||
|
@ -39570,6 +39577,7 @@
|
|||
active=start.firstChild.firstChild;
|
||||
active.classList.add('active');
|
||||
}
|
||||
if(!active.link) active._initLink();
|
||||
rightPane.appendChild(active.link);
|
||||
if(lib.config.fold_mode){
|
||||
rightPane.addEventListener('mousewheel',function(e){
|
||||
|
@ -39599,8 +39607,12 @@
|
|||
active.classList.remove('active');
|
||||
active.link.remove();
|
||||
active=this;
|
||||
this.classList.add('active');
|
||||
active.classList.add('active');
|
||||
if(this.link) rightPane.appendChild(this.link);
|
||||
else{
|
||||
this._initLink();
|
||||
rightPane.appendChild(this.link);
|
||||
}
|
||||
};
|
||||
|
||||
var clickAutoSkill=function(bool){
|
||||
|
@ -39678,6 +39690,7 @@
|
|||
var info=lib.configMenu[mode];
|
||||
var page=ui.create.div('');
|
||||
var node=ui.create.div('.menubutton.large',info.name,position,clickMode);
|
||||
node._initLink=function(){
|
||||
node.link=page;
|
||||
node.mode=mode;
|
||||
var map={};
|
||||
|
@ -40065,6 +40078,7 @@
|
|||
info.config.update(config,map);
|
||||
}
|
||||
}
|
||||
};
|
||||
return node;
|
||||
};
|
||||
|
||||
|
@ -40075,6 +40089,7 @@
|
|||
if(!game.download&&!lib.device) return;
|
||||
var page=ui.create.div('#create-extension');
|
||||
var node=ui.create.div('.menubutton.large','文件',start.firstChild,clickMode);
|
||||
node._initLink=function(){
|
||||
node.link=page;
|
||||
node.mode='create';
|
||||
var pageboard=ui.create.div(page);
|
||||
|
@ -40618,6 +40633,7 @@
|
|||
createDash('音','音频文件',dash2);
|
||||
createDash('字','字体文件',dash3);
|
||||
createDash('全','全部文件',dash4);
|
||||
};
|
||||
}());
|
||||
createModeConfig('others',start.firstChild);
|
||||
|
||||
|
@ -40626,6 +40642,7 @@
|
|||
active=start.firstChild.firstChild;
|
||||
active.classList.add('active');
|
||||
}
|
||||
if(!active.link) active._initLink();
|
||||
rightPane.appendChild(active.link);
|
||||
}());
|
||||
|
||||
|
@ -40644,7 +40661,11 @@
|
|||
}
|
||||
this.classList.add('active');
|
||||
updateActive(this);
|
||||
if(this.link) rightPane.appendChild(this.link);
|
||||
else{
|
||||
this._initLink();
|
||||
rightPane.appendChild(this.link);
|
||||
}
|
||||
};
|
||||
updateActive=function(node){
|
||||
if(!node){
|
||||
|
@ -40653,6 +40674,9 @@
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (!node.link) {
|
||||
node._initLink();
|
||||
}
|
||||
for(var i=0;i<node.link.childElementCount;i++){
|
||||
if(node.link.childNodes[i].updateBanned){
|
||||
node.link.childNodes[i].updateBanned();
|
||||
|
@ -40712,7 +40736,6 @@
|
|||
};
|
||||
|
||||
var createModeConfig=function(mode,position,position2){
|
||||
var info=lib.characterPack[mode];
|
||||
var page=ui.create.div('');
|
||||
var node=ui.create.div('.menubutton.large',lib.translate[mode+'_character_config'],position,clickMode);
|
||||
if(node.innerHTML.length>=5){
|
||||
|
@ -40721,6 +40744,8 @@
|
|||
if(position2){
|
||||
position.insertBefore(node,position2);
|
||||
}
|
||||
node._initLink=function(){
|
||||
var info=lib.characterPack[mode];
|
||||
node.link=page;
|
||||
node.mode=mode;
|
||||
page.node=node;
|
||||
|
@ -40867,17 +40892,17 @@
|
|||
delete this._banning;
|
||||
};
|
||||
var updateBanned=function(){
|
||||
var list;
|
||||
var _list;
|
||||
if(connectMenu){
|
||||
var mode=menux.pages[0].firstChild.querySelector('.active');
|
||||
if(mode&&mode.mode){
|
||||
list=lib.config['connect_'+mode.mode+'_banned'];
|
||||
_list=lib.config['connect_'+mode.mode+'_banned'];
|
||||
}
|
||||
}
|
||||
else{
|
||||
list=lib.config[get.mode()+'_banned'];
|
||||
_list=lib.config[get.mode()+'_banned'];
|
||||
}
|
||||
if(list&&list.contains(this.link)){
|
||||
if(_list&&_list.contains(this.link)){
|
||||
this.classList.add('banned');
|
||||
}
|
||||
else{
|
||||
|
@ -41014,6 +41039,7 @@
|
|||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
return node;
|
||||
};
|
||||
if(lib.config.show_favourite_menu&&!connectMenu&&Array.isArray(lib.config.favouriteCharacter)){
|
||||
|
@ -41024,7 +41050,9 @@
|
|||
lib.characterPack.mode_favourite[favname]=lib.character[favname];
|
||||
}
|
||||
}
|
||||
ui.favouriteCharacter=createModeConfig('mode_favourite',start.firstChild).link;
|
||||
var favouriteCharacterNode=createModeConfig('mode_favourite',start.firstChild);
|
||||
if(!favouriteCharacterNode.link) favouriteCharacterNode._initLink();
|
||||
ui.favouriteCharacter=favouriteCharacterNode.link;
|
||||
if(get.is.empty(lib.characterPack.mode_favourite)){
|
||||
ui.favouriteCharacter.node.style.display='none';
|
||||
}
|
||||
|
@ -41071,6 +41099,7 @@
|
|||
active.classList.add('active');
|
||||
updateActive(active);
|
||||
}
|
||||
if(!active.link) active._initLink();
|
||||
rightPane.appendChild(active.link);
|
||||
|
||||
if(!connectMenu){
|
||||
|
@ -41113,7 +41142,11 @@
|
|||
if(this.mode=='cardpile'){
|
||||
this.create();
|
||||
}
|
||||
if(this.link) rightPane.appendChild(this.link);
|
||||
else{
|
||||
this._initLink();
|
||||
rightPane.appendChild(this.link);
|
||||
}
|
||||
};
|
||||
updateActiveCard=function(node){
|
||||
if(!node){
|
||||
|
@ -41122,6 +41155,7 @@
|
|||
return;
|
||||
}
|
||||
}
|
||||
if(!node.link) node._initLink();
|
||||
for(var i=0;i<node.link.childElementCount;i++){
|
||||
if(node.link.childNodes[i].updateBanned){
|
||||
node.link.childNodes[i].updateBanned();
|
||||
|
@ -41202,6 +41236,7 @@
|
|||
if(node.innerHTML.length>=5){
|
||||
node.classList.add('smallfont');
|
||||
}
|
||||
node._initLink=function(){
|
||||
node.link=page;
|
||||
node.mode=mode;
|
||||
var list=[];
|
||||
|
@ -41472,6 +41507,7 @@
|
|||
}
|
||||
ui.create.div('.menuplaceholder',page);
|
||||
}
|
||||
};
|
||||
return node;
|
||||
};
|
||||
if(!connectMenu&&lib.config.show_ban_menu){
|
||||
|
@ -41510,6 +41546,7 @@
|
|||
active.classList.add('active');
|
||||
updateActiveCard(active);
|
||||
}
|
||||
if(!active.link) active._initLink();
|
||||
rightPane.appendChild(active.link);
|
||||
|
||||
(function(){
|
||||
|
@ -41669,7 +41706,11 @@
|
|||
active.link.remove();
|
||||
active=this;
|
||||
this.classList.add('active');
|
||||
if(this.link) rightPane.appendChild(this.link);
|
||||
else{
|
||||
this._initLink();
|
||||
rightPane.appendChild(this.link);
|
||||
}
|
||||
};
|
||||
ui.click.extensionTab=function(name){
|
||||
ui.click.menuTab('扩展');
|
||||
|
@ -41748,6 +41789,7 @@
|
|||
if(node.innerHTML.length>=5){
|
||||
node.classList.add('smallfont');
|
||||
}
|
||||
node._initLink=function(){
|
||||
node.link=page;
|
||||
node.mode=mode;
|
||||
for(var i in lib.extensionMenu[mode]){
|
||||
|
@ -41783,6 +41825,7 @@
|
|||
}
|
||||
page.appendChild(cfgnode);
|
||||
}
|
||||
};
|
||||
return node;
|
||||
};
|
||||
for(var i in lib.extensionMenu){
|
||||
|
@ -41795,6 +41838,7 @@
|
|||
if(lib.config.show_extensionmaker==false) return;
|
||||
var page=ui.create.div('#create-extension');
|
||||
var node=ui.create.div('.menubutton.large','制作扩展',start.firstChild,clickMode);
|
||||
node._initLink=function(){
|
||||
node.link=page;
|
||||
node.mode='create';
|
||||
var pageboard=ui.create.div(page);
|
||||
|
@ -43907,10 +43951,12 @@
|
|||
createDash('卡','编辑卡牌',dash2);
|
||||
createDash('技','编辑技能',dash3);
|
||||
createDash('码','编辑代码',dash4);
|
||||
};
|
||||
}());
|
||||
(function(){
|
||||
var page=ui.create.div('');
|
||||
var node=ui.create.div('.menubutton.large','获取扩展',start.firstChild,clickMode);
|
||||
node._initLink=function(){
|
||||
node.link=page;
|
||||
node.mode='get';
|
||||
page.listen(function(){
|
||||
|
@ -44210,12 +44256,14 @@
|
|||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
}());
|
||||
var active=start.firstChild.querySelector('.active');
|
||||
if(!active){
|
||||
active=start.firstChild.firstChild;
|
||||
active.classList.add('active');
|
||||
}
|
||||
if(!active.link) active._initLink();
|
||||
rightPane.appendChild(active.link);
|
||||
updateNodes();
|
||||
}());
|
||||
|
@ -44256,7 +44304,11 @@
|
|||
}
|
||||
active=this;
|
||||
this.classList.add('active');
|
||||
if(this.link) rightPane.appendChild(this.link);
|
||||
else{
|
||||
this._initLink();
|
||||
rightPane.appendChild(this.link);
|
||||
}
|
||||
if(this.type=='cheat'){
|
||||
cheatButton.style.display='';
|
||||
}
|
||||
|
@ -44287,6 +44339,7 @@
|
|||
ui.click.menuTab('其它');
|
||||
clickMode.call(ui.commandnode);
|
||||
};
|
||||
//更新菜单有本体函数赋值,就不要懒加载了
|
||||
(function(){
|
||||
var page=ui.create.div('');
|
||||
var node=ui.create.div('.menubutton.large','更新',start.firstChild,clickMode);
|
||||
|
@ -44982,6 +45035,9 @@
|
|||
}
|
||||
}());
|
||||
(function(){
|
||||
var page=ui.create.div('');
|
||||
var node=ui.create.div('.menubutton.large','控制',start.firstChild,clickMode);
|
||||
node._initLink=function(){
|
||||
var norow2=function(){
|
||||
var node=currentrow1;
|
||||
if(!node) return false;
|
||||
|
@ -45089,9 +45145,6 @@
|
|||
clickContainer.call(menuContainer);
|
||||
}
|
||||
});
|
||||
|
||||
var page=ui.create.div('');
|
||||
var node=ui.create.div('.menubutton.large','控制',start.firstChild,clickMode);
|
||||
node.link=page;
|
||||
node.type='cheat';
|
||||
page.classList.add('menu-sym');
|
||||
|
@ -45235,12 +45288,14 @@
|
|||
}
|
||||
checkCheat();
|
||||
});
|
||||
};
|
||||
}());
|
||||
(function(){
|
||||
var page=ui.create.div('');
|
||||
var node=ui.create.div('.menubutton.large','命令',start.firstChild,clickMode);
|
||||
ui.commandnode=node;
|
||||
node.type='cmd';
|
||||
node._initLink=function(){
|
||||
node.link=page;
|
||||
page.classList.add('menu-sym');
|
||||
menuUpdates.push(function(){
|
||||
|
@ -45411,11 +45466,13 @@
|
|||
clearButton.listen(function(){
|
||||
pre.innerHTML='';
|
||||
});
|
||||
};
|
||||
}());
|
||||
(function(){
|
||||
var page=ui.create.div('');
|
||||
var node=ui.create.div('.menubutton.large','战绩',start.firstChild,clickMode);
|
||||
node.type='rec';
|
||||
node._initLink=function(){
|
||||
node.link=page;
|
||||
page.style.paddingBottom='10px';
|
||||
var reset=function(){
|
||||
|
@ -45444,16 +45501,17 @@
|
|||
item.link=lib.config.all.mode[i];
|
||||
}
|
||||
}
|
||||
};
|
||||
}());
|
||||
(function(){
|
||||
if(!window.indexedDB||window.nodb) return;
|
||||
var page=ui.create.div('');
|
||||
var node=ui.create.div('.menubutton.large','录像',start.firstChild,clickMode);
|
||||
node.type='video';
|
||||
node.link=page;
|
||||
|
||||
var store=lib.db.transaction(['video'],'readwrite').objectStore('video');
|
||||
lib.videos=[];
|
||||
node._initLink=function(){
|
||||
node.link=page;
|
||||
var store=lib.db.transaction(['video'],'readwrite').objectStore('video');
|
||||
store.openCursor().onsuccess=function(e){
|
||||
var cursor=e.target.result;
|
||||
if(cursor){
|
||||
|
@ -45630,6 +45688,7 @@
|
|||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
}());
|
||||
|
||||
|
||||
|
@ -45700,6 +45759,7 @@
|
|||
active=start.firstChild.firstChild;
|
||||
active.classList.add('active');
|
||||
}
|
||||
if(!active.link) active._initLink();
|
||||
rightPane.appendChild(active.link);
|
||||
}());
|
||||
|
||||
|
|
Loading…
Reference in New Issue