From 316e60477663f13775b2a97a899dad4e709bacbe Mon Sep 17 00:00:00 2001 From: libccy Date: Mon, 13 Feb 2017 14:09:07 +0800 Subject: [PATCH] link --- game/game.js | 80 ++++++++++++++++++++++++++++--------- layout/default/layout.css | 79 +++++++++++++++++++++++++++++++++++- layout/mobile/layout.css | 3 ++ layout/newlayout/global.css | 3 +- theme/woodden/style.css | 4 ++ 5 files changed, 148 insertions(+), 21 deletions(-) diff --git a/game/game.js b/game/game.js index 21290e1c3..9d9d5d01f 100644 --- a/game/game.js +++ b/game/game.js @@ -1200,29 +1200,26 @@ ui.arena.dataset.target_shake=bool; } }, - cursor_style:{ - name:'指针样式', - init:'auto', + turned_style:{ + name:'翻面文字', + init:true, unfrequent:true, - item:{ - auto:'自动', - pointer:'指针' - }, - onclick:function(item){ - game.saveConfig('cursor_style',item); - if(item=='pointer'){ - ui.window.classList.add('nopointer'); + onclick:function(bool){ + game.saveConfig('turned_style',bool); + if(bool){ + ui.arena.classList.remove('hide_turned'); } else{ - ui.window.classList.remove('nopointer'); + ui.arena.classList.add('hide_turned'); } } }, - link_style:{ + link_style2:{ name:'横置样式', - init:'rotate', + init:'chain', unfrequent:true, item:{ + chain:'铁索', rotate:'横置', mark:'标记' }, @@ -1233,7 +1230,7 @@ list.push(game.players[i]); } } - game.saveConfig('link_style',style); + game.saveConfig('link_style2',style); for(var i=0;i
',node), judges:ui.create.div('.judges',node), marks:ui.create.div('.marks',node), + chain:ui.create.div('.chain','
',node), handcards1:ui.create.div('.handcards'), handcards2:ui.create.div('.handcards'), }; + for(var i=0;i<40;i++){ + ui.create.div(node.node.chain.firstChild,'.cardbg').style.transform='translateX('+(i*5-5)+'px)'; + } node.node.action=ui.create.div('.action',node.node.avatar); node.skipList=[]; @@ -30374,7 +30409,7 @@ } if(!num) num=5; for(var i=0;i.card>.info>span, } #arena.oldlayout .player:not(.linked2) .marks>div:first-child, +#arena.oldlayout:not(.nolink) .player .marks>div:first-child, #arena.oldlayout .player .marks .removing { transform: scale(0.2); opacity: 0; @@ -1736,7 +1737,80 @@ div:not(.handcards)>.card>.info>span, top: 87px; left: 18px; } - +.player>.turned{ + font-family: 'xinwei'; + width: 100%; + height: 100%; + line-height: 68px; + left: 0; + margin: 0; + padding: 0; + text-align: center; + font-size: 70px; + opacity: 0; + pointer-events: none; + text-shadow: none; + background: black; + top: 0; + border-radius: 8px; + color: rgba(255,255,255,0.8); + text-shadow: none; +} +.player>.turned>div{ + top:calc(50% - 68px); + width: 100%; + left: 0; +} +.player>.chain{ + top: calc(50% - 10px); + left: 0; + height: 20px; + width: 100%; + overflow-x: hidden; + overflow-y: visible; + white-space: nowrap; + padding: 0; + margin: 0; + z-index: 3; + pointer-events: none; +} +.player>.chain>div{ + overflow: visible; + left: 0; + top: 0; + margin: 0; + padding: 0; +} +.player:not(.linked2)>.chain>div{ + opacity: 0; + transform: translateX(-40px); +} +#arena.nolink .player>.chain{ + display: none; +} +.player>.chain>div>div{ + position: absolute; + margin: 0; + padding: 0; + left: 0; + box-shadow: rgba(0, 0, 0, 0.4) 0 0 0 1px,rgba(0, 0, 0, 0.4) 0 0 2px; +} +.player>.chain>div>div:nth-child(odd){ + height: 8px; + width: 10px; + border-radius: 2px; + top: 6px; +} +.player>.chain>div>div:nth-child(even){ + width: 10px; + height: 2px; + top: 9px; + z-index: 1; + border-radius: 2px; +} +#arena:not(.hide_turned):not(.oldlayout) .player.turnedover>.turned{ + opacity: 0.2; +} .player>.damage, #window>.damage { font-family: 'huangcao','xinwei'; @@ -3497,6 +3571,7 @@ div:hover>.wunature { #window[data-radius_size='reduce'] #mebg, #window[data-radius_size='reduce'] .control, #window[data-radius_size='reduce'] .player, +#window[data-radius_size='reduce'] .player>.turned, #window[data-radius_size='reduce'] .player::after, #window[data-radius_size='reduce'] .card, #window[data-radius_size='reduce'] .card::after, @@ -3516,6 +3591,7 @@ div:hover>.wunature { #window[data-radius_size='off'] #mebg, #window[data-radius_size='off'] .control, #window[data-radius_size='off'] .player, +#window[data-radius_size='off'] .player>.turned, #window[data-radius_size='off'] .player::after, #window[data-radius_size='off'] .card, #window[data-radius_size='off'] .card::after, @@ -3535,6 +3611,7 @@ div:hover>.wunature { #window[data-radius_size='increase'] #mebg, #window[data-radius_size='increase'] .control, #window[data-radius_size='increase'] .player, +#window[data-radius_size='increase'] .player>.turned, #window[data-radius_size='increase'] .player::after, #window[data-radius_size='increase'] .card, #window[data-radius_size='increase'] .card::after, diff --git a/layout/mobile/layout.css b/layout/mobile/layout.css index bf8d4d71e..6b12d0343 100644 --- a/layout/mobile/layout.css +++ b/layout/mobile/layout.css @@ -135,6 +135,9 @@ border-radius: 0 !important; pointer-events: none; } +#arena:not(.chess) .player[data-position='0']>.chain{ + width: 120px +} #arena.oblongcard:not(.chess) .player[data-position='0']{ height: 140px; } diff --git a/layout/newlayout/global.css b/layout/newlayout/global.css index 376a5796b..c72110ae6 100644 --- a/layout/newlayout/global.css +++ b/layout/newlayout/global.css @@ -160,7 +160,8 @@ top:26px; left:auto; } -.player:not(.linked2) .marks>div:first-child{ +.player:not(.linked2) .marks>div:first-child, +#arena:not(.nolink) .player .marks>div:first-child{ transform: scale(0.2); opacity:0; pointer-events: none; diff --git a/theme/woodden/style.css b/theme/woodden/style.css index 4a3932c10..1b972bfe0 100644 --- a/theme/woodden/style.css +++ b/theme/woodden/style.css @@ -199,6 +199,10 @@ html{ box-shadow:none; } +.player>.turned{ + color: rgba(0,0,0,0.8); + background: white; +} .player .marks>div:first-child>div{ -webkit-filter: invert(0.8) sepia(1); }