diff --git a/character/gujian.js b/character/gujian.js index b6cca1d07..e32da707c 100644 --- a/character/gujian.js +++ b/character/gujian.js @@ -357,7 +357,7 @@ character.gujian={ trigger:{player:'useCard'}, filter:function(event,player){ if(event.card.name!='sha') return false; - return game.hasPlayer(function(){ + return game.hasPlayer(function(current){ return (event.targets.contains(current)==false&¤t!=player&& lib.filter.targetEnabled(event.card,player,current)) }); diff --git a/game/game.js b/game/game.js index 010e379f0..74c4ca0cd 100644 --- a/game/game.js +++ b/game/game.js @@ -24339,6 +24339,16 @@ lib.setScroll(node); ui.create.div('',str1,dash); ui.create.div('',str2,dash); + }; + var createDash2=function(str1,str2,path,page){ + var dash=ui.create.div('.menubutton.large.dashboard.dashboard2'); + page.appendChild(dash); + dash.listen(function(){ + page.path=path; + enterDirectory(page,path); + }); + ui.create.div('',str1,dash); + ui.create.div('',str2,dash); }; var getFileList=function(dir,callback){ var files=[],folders=[]; @@ -24359,21 +24369,41 @@ }); } }; - var createFolder=function(dir,node){ - + var enterDirectory=function(page,path){ + page.innerHTML=''; + page.currentpath=path; + ui.create.div('.config.more.margin-bottom','
'+(path==page.path?'返回':'上一级'),page,function(){ + if(page.path==path){ + page.reset(); + } + else{ + enterDirectory(page,path.slice(0,path.lastIndexOf('/'))); + } + }); + getFileList(path,function(folders,files){ + for(var i=0;i'+files[i],page); + } + // console.log(folders,files); + }); }; var dash1=(function(){ var page=ui.create.div('.hidden.menu-buttons'); - ui.create.div('.config.more.margin-bottom','
返回',page,function(){ - ui.create.templayer(); - page.hide(); - pageboard.show(); - }); - page.init=function(){ - getFileList('image',function(folders,files){ - console.log(folders,files); - }); + page.reset=function(){ + page.innerHTML=''; + ui.create.div('.config.more.margin-bottom','
返回',page,function(){ + ui.create.templayer(); + page.hide(); + pageboard.show(); + }); + createDash2('将','武将图片','image/character',page); + createDash2('卡','卡牌图片','image/card',page); + createDash2('景','背景图片','image/background',page); + createDash2('肤','皮肤图片','image/skin',page); + createDash2('模','模式图片','image/mode',page); + createDash2('始','开始图片','image/splash',page); }; + page.reset(); return page; }()); var dash2=(function(){ diff --git a/layout/default/menu.css b/layout/default/menu.css index 6582c6783..fae9bf6d8 100644 --- a/layout/default/menu.css +++ b/layout/default/menu.css @@ -780,12 +780,40 @@ top:0; } +.menu-buttons .fileentry{ + position: relative; + left: 0; + display: block; + margin: 12px; + margin-bottom: 15px; + white-space: nowrap; + text-decoration: underline; + text-align: left; +} +.menu-buttons .fileentry>span{ + cursor: pointer; +} + .menubutton.large.dashboard{ width: 80px; height: 80px; margin: 6px; position: relative !important; } +.menubutton.large.dashboard.dashboard2{ + width: 60px; + height: 60px; + margin: 5px; + margin-top: 10px; +} +.menubutton.large.dashboard.dashboard2>div:first-child{ + font-size: 40px; + line-height: 40px; +} +.menubutton.large.dashboard.dashboard2>div:last-child{ + font-size: 16px; + white-space: nowrap; +} .menubutton.large.dashboard>div:first-child{ font-family: 'lishu','xiaozhuan'; font-size: 60px;