This commit is contained in:
libccy 2017-03-31 15:14:22 +08:00
parent d3f650c5a3
commit f59f8ee8e8
2 changed files with 36 additions and 9 deletions

View File

@ -7344,15 +7344,17 @@
ui.css.layout.href=lib.assetURL+'layout/'+game.layout+'/layout.css'; ui.css.layout.href=lib.assetURL+'layout/'+game.layout+'/layout.css';
if(game.layout=='mobile'||game.layout=='long'){ if(game.layout=='mobile'||game.layout=='long'){
ui.arena.classList.add('mobile'); ui.arena.classList.add('mobile');
}
else{
ui.arena.classList.remove('mobile');
}
if(game.layout=='mobile'||game.layout=='long'||game.layout=='long2'){
if(game.me&&game.me.node.handcards2.childNodes.length){ if(game.me&&game.me.node.handcards2.childNodes.length){
while(game.me.node.handcards2.childNodes.length){ while(game.me.node.handcards2.childNodes.length){
game.me.node.handcards1.appendChild(game.me.node.handcards2.firstChild); game.me.node.handcards1.appendChild(game.me.node.handcards2.firstChild);
} }
} }
} }
else{
ui.arena.classList.remove('mobile');
}
if(game.layout=='default'){ if(game.layout=='default'){
ui.arena.classList.add('oldlayout'); ui.arena.classList.add('oldlayout');
} }

View File

@ -230,17 +230,12 @@ mode.boss={
boss.dataset.position=7; boss.dataset.position=7;
} }
ui.create.me(); ui.create.me();
ui.fakeme=ui.create.div('.fakeme.avatar',ui.me);
if(game.me!==boss){ if(game.me!==boss){
game.singleHandcard=true; game.singleHandcard=true;
ui.arena.classList.add('single-handcard'); ui.arena.classList.add('single-handcard');
ui.window.classList.add('single-handcard'); ui.window.classList.add('single-handcard');
ui.fakeme=ui.create.div('.fakeme.avatar',ui.me);
// ui.fakeme.dataset.position=0;
// ui.fakeme.line=lib.element.player.line;
// ui.fakemebg=ui.create.div('.avatar',ui.fakeme).hide();
// ui.refresh(ui.fakemebg);
game.onSwapControl(); game.onSwapControl();
// ui.fakemebg.show();
if(lib.config.show_handcardbutton){ if(lib.config.show_handcardbutton){
lib.setPopped(ui.create.system('手牌',null,true),function(){ lib.setPopped(ui.create.system('手牌',null,true),function(){
@ -264,6 +259,9 @@ mode.boss={
},220); },220);
} }
} }
else{
ui.fakeme.style.display='none';
}
lib.setPopped(ui.create.system('重整',null,true),function(){ lib.setPopped(ui.create.system('重整',null,true),function(){
var uiintro=ui.create.dialog('hidden'); var uiintro=ui.create.dialog('hidden');
@ -573,8 +571,35 @@ mode.boss={
ui.updatehl(); ui.updatehl();
}, },
modeSwapPlayer:function(player){ modeSwapPlayer:function(player){
var bool=(game.me==game.boss||player==game.boss);
game.swapControl(player); game.swapControl(player);
game.onSwapControl(); game.onSwapControl();
if(!bool) return;
if(game.me==game.boss){
game.singleHandcard=false;
ui.arena.classList.remove('single-handcard');
ui.window.classList.remove('single-handcard');
ui.fakeme.style.display='none';
game.me.dataset.position=0;
game.me.nextSeat.dataset.position=2;
game.me.nextSeat.nextSeat.dataset.position=4;
game.me.nextSeat.nextSeat.nextSeat.dataset.position=6;
}
else{
game.singleHandcard=true;
ui.arena.classList.add('single-handcard');
ui.window.classList.add('single-handcard');
ui.fakeme.style.display='';
game.boss.dataset.position=7;
game.boss.nextSeat.dataset.position=1;
game.boss.nextSeat.nextSeat.dataset.position=2;
game.boss.nextSeat.nextSeat.nextSeat.dataset.position=3;
if(game.me&&game.me.node.handcards2.childNodes.length){
while(game.me.node.handcards2.childNodes.length){
game.me.node.handcards1.appendChild(game.me.node.handcards2.firstChild);
}
}
}
}, },
chooseCharacter:function(func){ chooseCharacter:function(func){
var next=game.createEvent('chooseCharacter',false); var next=game.createEvent('chooseCharacter',false);