From 408ca9dc46ea67f5082705656703248433ae3fa5 Mon Sep 17 00:00:00 2001 From: libccy Date: Sun, 15 May 2016 10:32:58 +0800 Subject: [PATCH] fix --- game/game.js | 34 +++++++++++++++++++++++++++++- game/update.js | 5 +++-- layout/mobile/equip.css | 42 +++++++++++++++++++------------------- layout/newlayout/equip.css | 2 +- theme/woodden/style.css | 10 ++++----- 5 files changed, 63 insertions(+), 30 deletions(-) diff --git a/game/game.js b/game/game.js index be1d2788a..651a3f456 100755 --- a/game/game.js +++ b/game/game.js @@ -479,8 +479,31 @@ else{ lib.init.layout(layout); } + if((lib.config.layout=='phone'||lib.config.layout=='mobile')&&lib.config.textequip=='text'){ + ui.arena.classList.add('textequip'); + } + else{ + ui.arena.classList.remove('textequip'); + } } }, + textequip:{ + name:'装备显示', + init:'image', + item:{ + image:'图片', + text:'文字', + }, + onclick:function(item){ + game.saveConfig('textequip',item); + if((lib.config.layout=='phone'||lib.config.layout=='mobile')&&item=='text'){ + ui.arena.classList.add('textequip'); + } + else{ + ui.arena.classList.remove('textequip'); + } + } + }, // background_color_music:{ // name:'背景色', // init:'black', @@ -1138,6 +1161,12 @@ else{ map.remember_round_button.hide(); map.reset_round_button.hide(); + } + if(lib.config.layout=='phone'||lib.config.layout=='mobile'){ + map.textequip.show(); + } + else{ + map.textequip.hide(); } // if(config.theme=='woodden'&&config.image_background=='default'){ // map.background_color_wood.show(); @@ -20831,7 +20860,7 @@ } download.link=i; download.name=list[i].name; - download.files=list[i].files; + download.files=list[i].files||[]; } },function(){ loading.innerHTML='连接失败'; @@ -22448,6 +22477,9 @@ if(lib.config.layout=='default'&&lib.config.hp_style=='official'){ ui.arena.classList.add('hpimage'); } + if((lib.config.layout=='phone'||lib.config.layout=='mobile')&&lib.config.textequip=='text'){ + ui.arena.classList.add('textequip'); + } // var themeentry='background_color_'+lib.config.theme; // if(lib.config[themeentry]){ // document.body.dataset[themeentry]=lib.config[themeentry]; diff --git a/game/update.js b/game/update.js index ae3536a4f..a4a175d6d 100644 --- a/game/update.js +++ b/game/update.js @@ -1,6 +1,7 @@ window.noname_update={ - version:'1.8.10.1', + version:'1.8.10.2', changeLog:[ - '扩展改进' + '扩展改进', + '装备显示选项' ] } diff --git a/layout/mobile/equip.css b/layout/mobile/equip.css index 248d11328..72eed5600 100644 --- a/layout/mobile/equip.css +++ b/layout/mobile/equip.css @@ -1,4 +1,4 @@ -#arena.textequip .player[data-position='0'] .equips, +#arena:not(.chess).textequip .player[data-position='0'] .equips, .player:not([data-position='0']) .equips, #arena.chess .player .equips{ width:120px; @@ -18,7 +18,7 @@ transform:scale(0.73); transform-origin:bottom left; } -#arena.textequip .player[data-position='0'] .equips>.card, +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card, .player:not([data-position='0']) .equips>.card, #arena.chess .player .equips>.card{ position:relative; @@ -47,24 +47,24 @@ linear-gradient(135deg,rgba(0,0,0,0.5) ,transparent 80%,transparent) !important; box-shadow:none; } -#arena.textequip .player[data-position='0'] .equips>.card>.image, +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card>.image, .player:not([data-position='0']) .equips>.card>.image, #arena.chess .player .equips>.card>.image{ display:none; } -#arena.textequip .player[data-position='0'].unseen .equips>.card, +#arena:not(.chess).textequip .player[data-position='0'].unseen .equips>.card, .player:not([data-position='0']).unseen .equips>.card, #arena.chess .player.unseen .equips>.card{ background:none; /*border-image:linear-gradient(to right, transparent,rgba(0,0,0,0.4) 10%,rgba(0, 0, 0,0.4) 70%,transparent) 100% 0 0;*/ } -#arena.textequip .player[data-position='0'].unseen .equips>.card, +#arena:not(.chess).textequip .player[data-position='0'].unseen .equips>.card, .player:not([data-position='0']).unseen .equips>.card, #arena.chess .player.unseen .equips>.card{ border-image:linear-gradient(to right, transparent,rgba(0,0,0,0.4) 10%,rgba(0, 0, 0,0.4) 70%,transparent) 100% 0 0; } -#arena.textequip .player[data-position='0'].unseen .equips>.card:first-child, +#arena:not(.chess).textequip .player[data-position='0'].unseen .equips>.card:first-child, .player:not([data-position='0']).unseen .equips>.card:first-child, #arena.chess .player.unseen .equips>.card:first-child{ border-image:linear-gradient(transparent,transparent); @@ -72,56 +72,56 @@ .player:not([data-position='0']) .equips>.card.selected, #arena.chess .player .equips>.card.selected{ background:linear-gradient(to right,rgba(0, 133, 255,0.3),transparent), - linear-gradient(135deg,rgba(0, 133, 255,0.5) ,transparent 80%,transparent); + linear-gradient(135deg,rgba(0, 133, 255,0.5) ,transparent 80%,transparent) !important; box-shadow:none !important; border-width: 1px 0 0; border-style:solid; border-image:linear-gradient(to right, rgba(0, 103, 205,0.4) 70%,transparent) 100% 0 0; } -#arena.textequip .player[data-position='0'] .equips>.card.selected{ +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card.selected{ background:linear-gradient(rgba(0, 133, 255,0.6),rgba(0, 133, 255,0.5)) !important; box-shadow: rgba(0,0,0,0.4) 0 1px 0 0 !important; } -#arena.textequip .player[data-position='0'] .equips>.card.fire, +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card.fire, .player:not([data-position='0']) .equips>.card.fire, #arena.chess .player .equips>.card.fire{ color: rgb(255,119,63); } -#arena.textequip .player[data-position='0'] .equips>.card.thunder, +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card.thunder, .player:not([data-position='0']) .equips>.card.thunder, #arena.chess .player .equips>.card.thunder{ color: rgb(117,186,255); } -#arena.textequip .player[data-position='0'] .equips>.card.poison, +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card.poison, .player:not([data-position='0']) .equips>.card.poison, #arena.chess .player .equips>.card.poison{ color: rgb(104,221,127); } -#arena.textequip .player[data-position='0'] .equips>.card.brown, +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card.brown, .player:not([data-position='0']) .equips>.card.brown, #arena.chess .player .equips>.card.brown{ color: rgb(195,161,223); } -#arena.textequip .player[data-position='0'] .equips>.card>.background, +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card>.background, .player:not([data-position='0']) .equips>.card>.background, #arena.chess .player .equips>.card>.background{ display:none !important; } -#arena.textequip .player[data-position='0'] .equips>.card>.name2, +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card>.name2, .player:not([data-position='0']) .equips>.card>.name2, #arena.chess .player .equips>.card>.name2{ display:block; margin-left:5px; } -#arena.textequip .player[data-position='0'] .equips>.card>div, +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card>div, .player:not([data-position='0']) .equips>.card>div, #arena.chess .player .equips>.card>div{ animation:none !important; -webkit-animation:none !important; } -#arena.textequip .player[data-position='0'] .equips>.card>.name, -#arena.textequip .player[data-position='0'] .equips>.card>.info, +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card>.name, +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card>.info, .player:not([data-position='0']) .equips>.card>.name, .player:not([data-position='0']) .equips>.card>.info, #arena.chess .player .equips>.card>.name, @@ -129,7 +129,7 @@ display:none !important; } -#arena.textequip .player[data-position='0'] .equips>.removing, +#arena:not(.chess).textequip .player[data-position='0'] .equips>.removing, .player:not([data-position='0']) .equips>.removing, #arena.chess .player .equips>.removing{ margin-top:-12px !important; @@ -137,14 +137,14 @@ transform:scale(1); } -#arena.textequip .player[data-position='0'] .equips>.removing+.removing, +#arena:not(.chess).textequip .player[data-position='0'] .equips>.removing+.removing, .player:not([data-position='0']) .equips>.removing+.removing, #arena.chess .player .equips>.removing+.removing{ margin-top:-23px !important; } -#arena.textequip .player[data-position='0'].linked .equips, +#arena:not(.chess).textequip .player[data-position='0'].linked .equips, .player:not([data-position='0']).linked .equips, #arena.chess .player.linked .equips{ transform:rotate(90deg) translate(-152px,-6px); @@ -169,7 +169,7 @@ transform:rotate(90deg); } -#arena.textequip .player[data-position='0'] .equips>.card{ +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card{ border-radius: 0px !important; left:0 !important; right: auto !important; diff --git a/layout/newlayout/equip.css b/layout/newlayout/equip.css index 06bd02e65..51c904d26 100644 --- a/layout/newlayout/equip.css +++ b/layout/newlayout/equip.css @@ -55,7 +55,7 @@ } .player .equips>.card.selected{ background:linear-gradient(to right,rgba(0, 133, 255,0.3),transparent), - linear-gradient(135deg,rgba(0, 133, 255,0.5) ,transparent 80%,transparent); + linear-gradient(135deg,rgba(0, 133, 255,0.5) ,transparent 80%,transparent) !important; box-shadow:none !important; border-width: 1px 0 0; border-style:solid; diff --git a/theme/woodden/style.css b/theme/woodden/style.css index e8890365a..821b97950 100755 --- a/theme/woodden/style.css +++ b/theme/woodden/style.css @@ -64,24 +64,24 @@ html{ #arena.mobile:not(.chess) .player[data-position='0'] .equips,.playerbg{ background: url('wood.jpg'); } -#arena.textequip .player[data-position='0'] .equips>.card{ +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card{ background: url('wood.jpg') !important; color:rgb(77, 60, 51) !important; text-shadow: none; box-shadow: rgba(0,0,0,0.4) 1px 0 0 1px; } -#arena.textequip .player[data-position='0'] .equips>.card:first-child{ +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card:first-child{ box-shadow: rgba(0,0,0,0.4) 0 1px 0 0; } -#arena.textequip .player[data-position='0'] .equips>.card.selected{ +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card.selected{ background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1)) !important; color: white !important; box-shadow: rgba(0,0,0,0.4) 1px 0 0 1px !important; } -#arena.textequip .player[data-position='0'] .equips>.card.selected:first-child{ +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card.selected:first-child{ box-shadow: rgba(0,0,0,0.4) 0 1px 0 0 !important; } -#arena.textequip .player[data-position='0'] .equips>.card>.name2{ +#arena:not(.chess).textequip .player[data-position='0'] .equips>.card>.name2{ transition: opacity 0.5s, color 0s; }