From 42ae656ea72eb67c1814f6c7481eb587429b1fea Mon Sep 17 00:00:00 2001 From: libccy Date: Fri, 17 Mar 2017 15:22:31 +0800 Subject: [PATCH] 6 --- game/game.js | 30 ++++++++++++++++++------------ layout/default/menu.css | 31 ++++++++++++++++++++++++++++--- layout/long2/layout.css | 1 + layout/mobile/layout.css | 1 + layout/mode/chess.css | 1 + 5 files changed, 49 insertions(+), 15 deletions(-) diff --git a/game/game.js b/game/game.js index a59e67eee..a40b085cd 100644 --- a/game/game.js +++ b/game/game.js @@ -490,6 +490,10 @@ me.style.left='3px'; me.style.bottom='3px'; me.style.height='25px'; + if(link=='newlayout'){ + me.style.height='23px'; + me.style.bottom='4px'; + } } else if(link=='long2'){ me.style.display='none'; @@ -500,14 +504,19 @@ me.style.bottom='0'; me.style.height='22px'; } + me.style.borderRadius='2px'; + var list=['re_caocao','re_liubei','sp_zhangjiao','sunquan']; for(var i=0;i<4;i++){ var player=ui.create.div('.fakeplayer',node); + ui.create.div('.avatar',player).setBackground(list.randomRemove(),'character'); + player.style.borderRadius='2px'; if(i!=3){ player.style.top='auto'; } if(link=='default'){ player.style.height='19px'; player.style.width='38px'; + player.classList.add('oldlayout') } else if(link=='mobile'||link=='newlayout'){ player.style.width='24px'; @@ -556,11 +565,6 @@ if(i==1||i==2){ player.style.bottom='30px'; } - if(i==0){ - player.style.borderRadius='0px'; - player.style.left='-2px'; - player.style.bottom='-7px'; - } } else if(link=='long'){ if(i==0||i==3){ @@ -569,13 +573,6 @@ if(i==1||i==2){ player.style.bottom='30px'; } - if(i==0){ - player.style.borderRadius='0px'; - player.style.left='-2px'; - player.style.width='24px'; - player.style.height='29px'; - player.style.bottom='-7px'; - } } else if(link=='long2'){ if(i==0){ @@ -589,6 +586,15 @@ player.style.bottom='41px'; } } + + if(i==0&&(link=='mobile'||link=='long')){ + player.classList.add('me'); + player.style.borderRadius='0px'; + player.style.width='25px'; + player.style.height='25px'; + player.style.bottom='-3px'; + player.style.left='-3px'; + } } } }, diff --git a/layout/default/menu.css b/layout/default/menu.css index 85b9c462b..59beaaea8 100644 --- a/layout/default/menu.css +++ b/layout/default/menu.css @@ -527,7 +527,7 @@ .themebutton.woodden>div>div{ background: url('../../theme/woodden/wood.png'); } -.themebutton.woodden>div>div:hover,.themebutton.woodden>div>div.active{ +.themebutton.woodden>div>div:not(.avatar):hover,.themebutton.woodden>div>div.active{ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 133, 255, 0.4) 0 0 0 2px, rgba(0, 133, 255, 1) 0 0 5px !important; } .themebutton.music{ @@ -551,15 +551,40 @@ .themebutton.simple>div>div{ background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)); } -.themebutton.simple>div>div:hover, +.themebutton.simple>div>div:not(.avatar):hover, .themebutton.simple>div>div.active, -.themebutton.music>div>div:hover, +.themebutton.music>div>div:not(.avatar):hover, .themebutton.music>div>div.active{ background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1)); } .themebutton>div>div:first-child{ margin-top:5px; } +.themebutton>.fakeplayer>.avatar{ + width: calc(100% - 2px); + height: calc(100% - 2px); + left: 1px; + top: 1px; + border-radius: 2px; + position: absolute; + margin: 0 !important; + padding: 0; + box-shadow: rgba(0,0,0,0.2) 0 0 0 1px inset; +} +.themebutton>.fakeplayer.oldlayout>.avatar{ + width: calc(50% - 2px); +} +.themebutton>.fakeplayer.me>.avatar{ + width: 22px; + height: 22px; + left: 3px; + top: 0; + box-shadow: none; + border-radius: 0px; +} +.themebutton>.fakeplayer.me{ + -webkit-clip-path: polygon(-10px 0, 32px 0, 32px 32px, -10px 32px); +} #window:not(.nopointer) .popup-container>.menu>div{ cursor: pointer; } diff --git a/layout/long2/layout.css b/layout/long2/layout.css index 2ad2c2649..2c9c06e02 100644 --- a/layout/long2/layout.css +++ b/layout/long2/layout.css @@ -184,6 +184,7 @@ top:0; left:0; background-size:cover; + -webkit-clip-path: polygon(-10px 0, 130px 0, 130px 130px, -10px 130px); } #window[data-radius_size='increase'] #me>.fakeme.avatar, #window[data-radius_size='reduce'] #me>.fakeme.avatar{ diff --git a/layout/mobile/layout.css b/layout/mobile/layout.css index ca9c7ae78..63c533270 100644 --- a/layout/mobile/layout.css +++ b/layout/mobile/layout.css @@ -287,6 +287,7 @@ top:0; left:0; background-size:cover; + -webkit-clip-path: polygon(-10px 0, 130px 0, 130px 130px, -10px 130px); } #window[data-radius_size='increase'] #me>.fakeme.avatar, #window[data-radius_size='reduce'] #me>.fakeme.avatar{ diff --git a/layout/mode/chess.css b/layout/mode/chess.css index 23d587176..cecba307e 100644 --- a/layout/mode/chess.css +++ b/layout/mode/chess.css @@ -23,6 +23,7 @@ top: 0; left: 0; background-size: cover; + -webkit-clip-path: polygon(-10px 0, 130px 0, 130px 130px, -10px 130px); } #window:not(.nopointer) .dialog.fullheight .buttons .button.character:not(.squarebutton):not(.selectable){ cursor: default;