diff --git a/CHANGELOG.MD b/CHANGELOG.MD index cca06d21d..46c7f7ba0 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,3 +1,4 @@ -1.5.5.1 +1.5.6 修复安卓版的两个显示问题 按钮效果 +不对敌将用桃选项 diff --git a/game/game.js b/game/game.js index 7de0954b0..5bcda3ce2 100755 --- a/game/game.js +++ b/game/game.js @@ -59,20 +59,30 @@ auto_confirm:{ name:'自动确认', init:true, + unfrequent:true, }, enable_drag:{ name:'启用拖拽', init:true, + unfrequent:true, }, wuxie_self:{ name:'不无懈自己', init:true, }, + tao_enemy:{ + name:'不对敌将使用桃', + init:false, + }, touchscreen:{ name:'触屏模式', init:false, restart:true }, + low_performance:{ + name:'低性能模式', + init:false + }, game_speed:{ name:'游戏速度', init:'mid', @@ -154,25 +164,27 @@ unfrequent:true, }, update:function(config,map){ - if(!config.hover_all){ - map.hover_handcard.hide(); - map.hoveration.hide(); - } - else{ - map.hover_handcard.show(); - map.hoveration.show(); - } if(config.touchscreen){ map.mousewheel.hide(); map.hover_all.hide(); map.hover_handcard.hide(); map.hoveration.hide(); + map.right_info.hide(); + map.right_click.hide(); } else{ map.mousewheel.show(); map.hover_all.show(); - map.hover_handcard.show(); - map.hoveration.show(); + map.right_info.show(); + map.right_click.show(); + if(!config.hover_all){ + map.hover_handcard.hide(); + map.hoveration.hide(); + } + else{ + map.hover_handcard.show(); + map.hoveration.show(); + } } } } @@ -3329,7 +3341,9 @@ sort=lib.config.sort_card(cards[num]); if(lib.config.reverse_sort) sort=-sort; cards[num].fix(); - cards[num].animate('start'); + if(!lib.config.low_performance){ + cards[num].animate('start'); + } if(lib.isSingleHandcard()||sort>0) frag1.appendChild(cards[num]); else frag2.appendChild(cards[num]); @@ -3401,7 +3415,12 @@ cards[i].goto(event.position); } else{ - cards[i].delete(); + if(lib.config.low_performance){ + cards[i].remove(); + } + else{ + cards[i].delete(); + } } } game.addVideo('lose',player,[get.cardsInfo(hs),get.cardsInfo(es),get.cardsInfo(js)]); @@ -5104,7 +5123,7 @@ } for(var i=0;i0){ @@ -5932,7 +5951,12 @@ var dx=this.offsetLeft+this.offsetWidth/2-52-node.offsetLeft; var dy=this.offsetTop+this.offsetHeight/2-52-node.offsetTop; - node.style.transform+=' translate('+dx+'px,'+dy+'px)'; + if(node.style.transform&&node.style.transform!='none'){ + node.style.transform+=' translate('+dx+'px,'+dy+'px)'; + } + else{ + node.style.transform='translate('+dx+'px,'+dy+'px)'; + } node.show(); setTimeout(function(){ @@ -5969,6 +5993,7 @@ node1.classList.add('cardflip'); node1.style.transform='none'; node1.style.transition=''; + node1.removeEventListener('webkitTransitionEnd',onEnd); } // node1.addEventListener('transitionEnd',onEnd); node1.addEventListener('webkitTransitionEnd',onEnd); @@ -5989,6 +6014,7 @@ node2.classList.add('cardflip'); node2.style.transform='none'; node2.style.transition=''; + node2.removeEventListener('webkitTransitionEnd',onEnd); } // node2.addEventListener('transitionEnd',onEnd); node2.addEventListener('webkitTransitionEnd',onEnd); @@ -6015,10 +6041,13 @@ } else{ if(card==undefined||card.length==0) return; - if(false){ - var node=this.$throwxy(card, - 'calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*100+'px)', - 'calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*80+'px)' + if(lib.config.low_performance){ + var left=-52+(Math.random()<0.5?1:-1)*Math.random()*100; + var top=-52+(Math.random()<0.5?1:-1)*Math.random()*80; + + var node=this.$throwxy2(card, + 'calc(50% '+(left>0?'+':'-')+' '+Math.abs(left)+'px)', + 'calc(50% '+(top>0?'+':'-')+' '+Math.abs(top)+'px)' ); } else{ @@ -6107,7 +6136,12 @@ ny=ny[0]*ui.arena.offsetHeight/100+ny[1]; var dx=this.offsetLeft+this.offsetWidth/2-52-nx; var dy=this.offsetTop+this.offsetHeight/2-52-ny; - node.style.transform+=' translate('+dx+'px,'+dy+'px)'; + if(node.style.transform&&node.style.transform!='none'){ + node.style.transform+=' translate('+dx+'px,'+dy+'px)'; + } + else{ + node.style.transform='translate('+dx+'px,'+dy+'px)'; + } } ui.arena.appendChild(node); ui.refresh(node); @@ -6120,6 +6154,7 @@ node.dataset.position=this.dataset.position; node.hide(); node.style.transitionProperty='left,top,opacity'; + ui.arena.appendChild(node); ui.refresh(node); node.show(); @@ -6127,6 +6162,37 @@ node.style.top=top; return node; }, + $throwxy2:function(card,left,top){ + var node=card.copy('thrown'); + node.style.left=left; + node.style.top=top; + node.hide(); + node.style.transitionProperty='left,top,opacity,transform'; + + var parseCalc=function(str){ + var per=str.slice(str.indexOf('calc(')+5,str.indexOf('%')); + var add=str.slice(str.indexOf('%')+1,str.indexOf('px')).replace(/\s/g,''); + return [parseInt(per),parseInt(add)]; + } + var nx=parseCalc(node.style.left); + var ny=parseCalc(node.style.top); + nx=nx[0]*ui.arena.offsetWidth/100+nx[1]; + ny=ny[0]*ui.arena.offsetHeight/100+ny[1]; + var dx=this.offsetLeft+this.offsetWidth/2-52-nx; + var dy=this.offsetTop+this.offsetHeight/2-52-ny; + if(node.style.transform&&node.style.transform!='none'){ + node.style.transform+=' translate('+dx+'px,'+dy+'px)'; + } + else{ + node.style.transform='translate('+dx+'px,'+dy+'px)'; + } + + ui.arena.appendChild(node); + ui.refresh(node); + node.show(); + node.style.transform=''; + return node; + }, $give:function(card,player,log,init){ if(init!==false){ if(typeof card=='number'&&card>=0){ @@ -6208,7 +6274,12 @@ // node.dataset.position=player.dataset.position; var dx=player.offsetLeft+player.offsetWidth/2-52-node.offsetLeft; var dy=player.offsetTop+player.offsetHeight/2-52-node.offsetTop; - node.style.transform+=' translate('+dx+'px,'+dy+'px)'; + if(node.style.transform&&node.style.transform!='none'){ + node.style.transform+=' translate('+dx+'px,'+dy+'px)'; + } + else{ + node.style.transform='translate('+dx+'px,'+dy+'px)'; + } node.delete(); },700); @@ -6712,7 +6783,12 @@ var dx=player.offsetLeft+player.offsetWidth/2-52-this.offsetLeft; var dy=player.offsetTop+player.offsetHeight/2-52-this.offsetTop; - this.style.transform+=' translate('+dx+'px,'+dy+'px)'; + if(this.style.transform&&this.style.transform!='none'){ + this.style.transform+=' translate('+dx+'px,'+dy+'px)'; + } + else{ + this.style.transform='translate('+dx+'px,'+dy+'px)'; + } // this.dataset.position=player.dataset.position; if(method=='flip'){ @@ -7076,25 +7152,51 @@ node.addEventListener(lib.config.touchscreen?'touchstart':'mousedown',function(e){ node.classList.add('controlthundertext'); node.parentNode.classList.add('controlpressdown'); + node.parentNode.classList.add('controlpressdownx'); }); node.addEventListener(lib.config.touchscreen?'touchend':'mouseup',function(e){ node.classList.remove('controlthundertext'); node.parentNode.classList.remove('controlpressdown'); + setTimeout(function(){ + node.parentNode.classList.remove('controlpressdownx'); + },200); }); node.addEventListener(lib.config.touchscreen?'touchmove':'mousemove',function(e){ node.classList.remove('controlthundertext'); node.parentNode.classList.remove('controlpressdown'); + setTimeout(function(){ + node.parentNode.classList.remove('controlpressdownx'); + },200); }); } }, close:function(){ ui.controls.remove(this); - this.style.width=0; - this.style.paddingLeft=0; - this.style.paddingRight=0; - this.style.marginLeft=0; - this.style.marginRight=0; - this.delete(); + + if(lib.config.low_performance){ + this.remove(); + } + else{ + this.delete(); + } + + var that=this; + setTimeout(function(){ + var nc=true; + for(var i=0;i*{pointer-events: auto;} .control{padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;margin-left: 4px;margin-right: 4px;} .control{font-size: 18px;white-space: nowrap;position: relative;overflow: hidden;opacity:0} -.control:not(.nozoom){width:0} +/*.control:not(.nozoom){width:0}*/ +.control.removing.removing2{transform: scale(0.8)} .control>div{position: relative;padding: 3px;} /*--------角色--------*/ .player>.avatar>.action{ @@ -856,9 +857,6 @@ div[data-color="unknownm"]{ .controlthundertext{ color: rgb(117,186,255); } -.controlthundertext{ - /*transform: scale(0.95);*/ -} .poisontext{ color: rgb(104,221,127); } diff --git a/layout/default/menu.css b/layout/default/menu.css index 54758b602..e462f7bf3 100644 --- a/layout/default/menu.css +++ b/layout/default/menu.css @@ -367,8 +367,11 @@ .menubutton.active{ background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1)); } -#system>div>.pressdown,.controlpressdown{ - transform: scale(0.95); +#system>div>.pressdown,.controlpressdown,.pressdown_delay{ + transform: scale(0.97); +} +.controlpressdownx{ + transition: all 0.1s; } #system>div>.pressdown2{ background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1)); diff --git a/layout/phone/layout.css b/layout/phone/layout.css index 1cee6446d..f236baf83 100644 --- a/layout/phone/layout.css +++ b/layout/phone/layout.css @@ -48,8 +48,9 @@ } .menu-container>.menu.main { - top: 62px !important; - transform: scale(1.3) !important; + top: 55px !important; + left: 10px !important; + zoom:1.3; } #arena.phonetop{ diff --git a/manifest.json b/manifest.json index f0802d2a8..cb468b72c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "noname", - "xwalk_version": "1.5.5", + "xwalk_version": "1.5.6", "start_url": "index.html", "icons": [ { diff --git a/mode/chess.js b/mode/chess.js index 5b4e8a99a..59ac90905 100755 --- a/mode/chess.js +++ b/mode/chess.js @@ -407,7 +407,12 @@ mode.chess={ node.fixed=true; game.$randomMove(this,node,100,30); var ot=node.style.transform; - node.style.transform+='scale(0.6)'; + if(node.style.transform&&node.style.transform!='none'){ + node.style.transform+=' scale(0.6)'; + } + else{ + node.style.transform='scale(0.6)'; + } node.dataset.position=this.dataset.position; this.parentNode.appendChild(node); ui.refresh(node); diff --git a/package.json b/package.json index a5e75f822..cdb3c5a7b 100755 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "name" : "无名杀", - "version" : "1.1.0", + "version" : "1.5.6", "main" : "main.js" } diff --git a/theme/woodden/style.css b/theme/woodden/style.css index f6928c9f1..babc564d4 100755 --- a/theme/woodden/style.css +++ b/theme/woodden/style.css @@ -30,10 +30,12 @@ html{ .popup.thunder{ color: rgb(117,186,255); } -.control .thundertext, -.control .controlthundertext{ +.control .thundertext{ color: rgba(29, 63, 137, 1); } +.control .controlthundertext{ + color: rgb(62, 41, 30); +} .player,.card,.button,.dialog>.bar, #arena.mobile:not(.chess) .player[data-position='0'] .equips{ background: url('wood.jpg');