This commit is contained in:
libccy 2017-02-10 19:06:45 +08:00
parent 95259c8d5f
commit 9e418ef79f
3 changed files with 23 additions and 24 deletions

View File

@ -1624,7 +1624,7 @@ card.standard={
if(translation.length>=4){ if(translation.length>=4){
translation=lib.translate[card.name+'_ab']||translation.slice(0,2); translation=lib.translate[card.name+'_ab']||translation.slice(0,2);
} }
ui.tempnowuxie=ui.create.control('不无懈'+translation,ui.click.tempnowuxie); ui.tempnowuxie=ui.create.control('不无懈'+translation,ui.click.tempnowuxie,'stayleft');
ui.tempnowuxie._origin=id2; ui.tempnowuxie._origin=id2;
} }
var next=player.chooseToUse({ var next=player.chooseToUse({

View File

@ -17,7 +17,7 @@
}; };
var lib={ var lib={
configprefix:'noname_0.9_', configprefix:'noname_0.9_',
versionOL:17, versionOL:18,
sourceURL:'https://rawgit.com/libccy/noname/$version$/', sourceURL:'https://rawgit.com/libccy/noname/$version$/',
updateURL:'https://raw.githubusercontent.com/libccy/noname/$version$/', updateURL:'https://raw.githubusercontent.com/libccy/noname/$version$/',
assetURL:'', assetURL:'',
@ -29042,6 +29042,9 @@
else if(controls[i]=='nozoom'){ else if(controls[i]=='nozoom'){
nozoom=true; nozoom=true;
} }
else if(controls[i]=='stayleft'){
control.stayleft=true;
}
else{ else{
control.add(controls[i]); control.add(controls[i]);
} }
@ -29070,6 +29073,8 @@
ui.refresh(control); ui.refresh(control);
control.style.transition=''; control.style.transition='';
} }
control.addEventListener(lib.config.touchscreen?'touchend':'click',ui.click.control2);
ui.updatec(); ui.updatec();
return control; return control;
}, },
@ -31995,6 +32000,11 @@
} }
game.check(); game.check();
}, },
control2:function(){
if(this.childNodes.length==1&&!this._doubleclick){
ui.click.control.call(this.firstChild);
}
},
control:function(){ control:function(){
if(_status.dragged) return; if(_status.dragged) return;
if(ui.control.classList.contains('hidden')) return; if(ui.control.classList.contains('hidden')) return;
@ -32579,27 +32589,17 @@
controls.push(node); controls.push(node);
} }
} }
var hasWuxie=false; var stayleft=null;
for(var i=0;i<ui.control.childNodes.length;i++){ for(var i=0;i<ui.control.childNodes.length;i++){
if(ui.control.childNodes[i].classList.contains('removing')) continue; if(ui.control.childNodes[i].classList.contains('removing')) continue;
if(lib.config.wuxie_right&&ui.control.childNodes[i]==ui.tempnowuxie){ if(!stayleft&&lib.config.wuxie_right&&ui.control.childNodes[i].stayleft){
hasWuxie=true; stayleft=ui.control.childNodes[i];
} }
else{ else{
add(ui.control.childNodes[i]); add(ui.control.childNodes[i]);
} }
// if(game.layout!='default'&&game.layout!='newlayout'){
// if(game.layout=='long'||game.layout=='long2'||game.chess||parseInt(ui.arena.dataset.number)<=5){
// ui.tempnowuxie._offset=ui.arena.offsetWidth/2-ui.tempnowuxie.offsetWidth-8;
// }
// else{
// ui.tempnowuxie._offset=ui.arena.offsetWidth/2-ui.tempnowuxie.offsetWidth-162;
// }
// ui.tempnowuxie.style.transform='translateX('+ui.tempnowuxie._offset+'px)';
// continue;
// }
} }
if(hasWuxie){ if(stayleft){
var fullwidth=0; var fullwidth=0;
var fullright=(game.layout=='long'||game.layout=='long2'||game.chess||parseInt(ui.arena.dataset.number)<=5); var fullright=(game.layout=='long'||game.layout=='long2'||game.chess||parseInt(ui.arena.dataset.number)<=5);
for(var i=0;i<widths.length;i++){ for(var i=0;i<widths.length;i++){
@ -32607,7 +32607,7 @@
if(get.is.phoneLayout()) fullwidth+=6; if(get.is.phoneLayout()) fullwidth+=6;
} }
fullwidth/=2; fullwidth/=2;
fullwidth+=ui.tempnowuxie.offsetWidth; fullwidth+=stayleft.offsetWidth;
if(get.is.phoneLayout()){ if(get.is.phoneLayout()){
fullwidth+=18; fullwidth+=18;
} }
@ -32622,15 +32622,15 @@
} }
if(game.layout!='default'&&game.layout!='newlayout'&&ui.arena.offsetWidth/2>=fullwidth){ if(game.layout!='default'&&game.layout!='newlayout'&&ui.arena.offsetWidth/2>=fullwidth){
if(fullright){ if(fullright){
ui.tempnowuxie._offset=-ui.arena.offsetWidth/2+135; stayleft._offset=-ui.arena.offsetWidth/2+135;
} }
else{ else{
ui.tempnowuxie._offset=-ui.arena.offsetWidth/2+165; stayleft._offset=-ui.arena.offsetWidth/2+165;
} }
ui.tempnowuxie.style.transform='translateX('+ui.tempnowuxie._offset+'px)'; stayleft.style.transform='translateX('+stayleft._offset+'px)';
} }
else{ else{
add(ui.tempnowuxie,true); add(stayleft,true);
} }
} }
if(!controls.length) return; if(!controls.length) return;

View File

@ -1,9 +1,8 @@
window.noname_update={ window.noname_update={
version:'1.9.8.2', version:'1.9.8.3',
update:'1.9.8.2', update:'1.9.8.3',
changeLog:[ changeLog:[
'bug修复', 'bug修复',
'统率三军',
], ],
files:[ files:[
// 'game/game.js', // 'game/game.js',