From ada03e728a20d83c9a6a9c05b162c5d8846ab06e Mon Sep 17 00:00:00 2001 From: libccy Date: Tue, 8 Dec 2015 08:56:54 +0800 Subject: [PATCH] l --- game/game.js | 122 ++++++++++++++++++++++++++++++++------ game/package.js | 1 - layout/default/layout.css | 2 +- 3 files changed, 105 insertions(+), 20 deletions(-) diff --git a/game/game.js b/game/game.js index a10291be8..d0ecea53f 100755 --- a/game/game.js +++ b/game/game.js @@ -26,6 +26,7 @@ '开始界面', '中间显示历史记录', '左滑/右滑手势', + '自定义背景音乐', '自定义武将', ], configprefix:'noname_0.9_', @@ -985,15 +986,32 @@ audio:{ name:'音效', config:{ + update:function(config,map){ + if(lib.config.background_music=='music_custom'&&lib.db){ + map.import_music.show(); + } + else{ + map.import_music.hide(); + } + }, background_music:{ name:'背景音乐', init:true, - item:{}, + item:{ + music_default:'默认', + music_custom:'自定', + }, onclick:function(item){ game.saveConfig('background_music',item); game.playBackgroundMusic(); } }, + import_music:{ + name:'
'+ + ''+ + '
', + clear:true, + }, background_audio:{ name:'游戏音效', init:true, @@ -2619,7 +2637,7 @@ var metas=document.head.querySelectorAll('meta'); for(var i=0;i'; - } + // for(var i=0;i'; + // } if(character2&&lib.character[character2]){ var info2=lib.character[character2]; this.classList.add('fullskin2'); @@ -4768,14 +4789,14 @@ this.node.count.classList.add('p2'); skills=skills.concat(info2[3]); - var name=get.translation(character2); - this.node.name2.innerHTML=''; + // var name=get.translation(character2); + this.node.name2.innerHTML=get.slimName(character2);; if(!lib.config.show_name){ this.node.name2.style.display='none'; } - for(var i=0;i'; - } + // for(var i=0;i'; + // } } if(skill!=false){ for(var i=0;i'; - } + // var name=get.translation(item); + node.node.name.innerHTML=get.slimName(item); + // for(var i=0;i'; + // } node.node.intro.innerHTML=lib.config.intro; if(!noclick){ if(lib.config.touchscreen){ @@ -18066,6 +18131,18 @@ } return str2; }, + slimName:function(str){ + var str2=str; + if(str2.indexOf('_')!=-1){ + str2=str2.slice(str2.indexOf('_')+1); + } + if(lib.translate[str2]){ + return get.verticalStr(lib.translate[str2]); + } + else{ + return get.verticalStr(lib.translate[str]); + } + }, time:function(){ if(lib.status.dateDelaying){ return lib.getUTC(lib.status.dateDelaying)-lib.getUTC(lib.status.date)-lib.status.dateDelayed; @@ -18607,6 +18684,10 @@ if(game.players[i].get('hej').contains(card)||game.players[i].judging==card) return game.players[i]; } + for(var i=0;i.tutorial_tap{