From 758f2fa54cfb057435499576aca9a7961b6a01d9 Mon Sep 17 00:00:00 2001 From: libccy Date: Tue, 29 Mar 2016 08:21:22 +0800 Subject: [PATCH] dialog --- game/config.js | 2 +- game/game.js | 73 +++++++++++++++++++++++++++++++++++++++++-------- game/package.js | 6 ++-- game/update.js | 5 ++-- 4 files changed, 69 insertions(+), 17 deletions(-) diff --git a/game/config.js b/game/config.js index eda3c7b4b..5d5d6cec6 100755 --- a/game/config.js +++ b/game/config.js @@ -257,7 +257,7 @@ window.config={ sort:'type_sort', cards:['standard','ex','extra','refresh'], - characters:['standard','shenhua','refresh','yijiang'], + characters:['standard','shenhua','refresh','sp','yijiang'], plays:[], extensions:[], banned:[], diff --git a/game/game.js b/game/game.js index 15d0d6397..fc1918f9c 100755 --- a/game/game.js +++ b/game/game.js @@ -825,6 +825,17 @@ game.saveConfig('dialog_transform',[0,0]); } }, + character_dialog_tool:{ + name:'自由选将显示', + init:'recent', + item:{ + favourite:'收藏', + recent:'最近', + diy:'自创', + all:'全部' + }, + unfrequent:true, + }, hide_card_image:{ name:'隐藏卡牌背景', init:false, @@ -14372,7 +14383,7 @@ dialog.currentgroupnode=null; node.classList.remove('thundertext'); for(var i=0;ib?1:-1; }); + if(!thisiscard){ + namecapt.remove('自创'); + namecapt.push('newline'); + namecapt.push('收藏'); + namecapt.push('最近'); + namecapt.push('自创'); + } + var newlined=false; var clickCapt=function(e){ if(_status.dragged) return; if(this.classList.contains('thundertext')){ @@ -14503,7 +14522,7 @@ dialog.currentcaptnode=this; this.classList.add('thundertext'); for(var i=0;ibb?1:-1; }); dialog=ui.create.dialog('hidden'); + dialog.getCurrentCapt=function(link,capt){ + if(this.currentcapt=='收藏'&&(capt=='j'||capt=='t')) return capt; + return this.currentcapt; + } if(str){ dialog.add(str); } @@ -14613,6 +14660,10 @@ dialog.buttons[i].capt=getCapt(dialog.buttons[i].link); } } + + if(!thisiscard&&['favourite','recent','diy'].contains(lib.config.character_dialog_tool)){ + clickCapt.call(node[lib.config.character_dialog_tool]); + } return dialog; }, dialog:function(){ diff --git a/game/package.js b/game/package.js index 146abc22f..55b4df612 100755 --- a/game/package.js +++ b/game/package.js @@ -2,10 +2,10 @@ character.pack={ standard:'标准', shenhua:'神话再临', refresh:'界限突破', - extra:'神将', - sp:'SP', - guozhan:'国战', yijiang:'一将成名', + sp:'SP', + extra:'神将', + guozhan:'国战', diy:'DIY', yxs:'英雄杀', hearth:'炉石传说', diff --git a/game/update.js b/game/update.js index 1d22e9404..16e9857ae 100644 --- a/game/update.js +++ b/game/update.js @@ -1,7 +1,8 @@ window.noname_update={ version:'1.8.1', changeLog:[ - '游戏内安装新版本和素材(iOS和android)', - 'bug修复' + '游戏内安装新版本和素材', + 'bug修复', + '自由选将改进' ] }