修复`ui.create.identityCard`在触屏模式的问题
This commit is contained in:
parent
bcf4916f0a
commit
e7799ed3f5
|
@ -145,7 +145,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}).join('、')}`,
|
||||
},
|
||||
$createButton:function(item,type,position,noclick,node){
|
||||
node=ui.create.identityCard(item,position,null,noclick);
|
||||
node=ui.create.identityCard(item,position,noclick);
|
||||
node.link=item;
|
||||
return node;
|
||||
},
|
||||
|
@ -176,7 +176,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
[list,function(item,type,position,noclick,node){
|
||||
return lib.skill.jxlianpo.$createButton(item,type,position,noclick,node);
|
||||
}],
|
||||
])
|
||||
],true);
|
||||
'step 1'
|
||||
var choice=result.links[0],mark=`jxlianpo_mark_${choice}`;
|
||||
player.when({global:'roundStart'})
|
||||
|
@ -192,13 +192,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
});
|
||||
player.addMark(mark,1,false);
|
||||
var videoId=lib.status.videoId++;
|
||||
event.videoId=lib.status.videoId++;
|
||||
var createDialog=function(player,identity,id){
|
||||
var dialog=ui.create.dialog(`${get.translation(player)}展示了“${get.translation(identity+'2')}”的身份牌<br>`,'forcebutton');
|
||||
dialog.videoId=id;
|
||||
ui.create.spinningIdentityCard(identity,dialog);
|
||||
};
|
||||
game.broadcastAll(createDialog,player,choice,videoId);
|
||||
game.broadcastAll(createDialog,player,choice,event.videoId);
|
||||
var color='';
|
||||
if(choice=='zhong') color='#y';
|
||||
else if(choice=='fan') color='#g';
|
||||
|
@ -206,7 +206,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
game.log(player,'展示了',`${color}${get.translation(choice+'2')}`,'的身份牌');
|
||||
game.delay(3);
|
||||
'step 2'
|
||||
game.broadcastAll('closeDialog',videoId);
|
||||
game.broadcastAll('closeDialog',event.videoId);
|
||||
}
|
||||
},
|
||||
global:{
|
||||
|
|
|
@ -43336,8 +43336,8 @@
|
|||
},
|
||||
create:{
|
||||
//创建身份牌实例
|
||||
identityCard:function(identity,position,info,noclick){
|
||||
const card=ui.create.card(position,info,noclick);
|
||||
identityCard:function(identity,position,noclick){
|
||||
const card=ui.create.card(position,'noclick',noclick);
|
||||
card.classList.add('button');
|
||||
card._customintro=uiintro=>uiintro.add(`${get.translation(`${identity}${2}`)}的身份牌`);
|
||||
const fileName=`image/card/identity_${identity}.jpg`;
|
||||
|
|
Loading…
Reference in New Issue