[]这是图文混排谷歌浏览器查看正常打包后的APP文字消失表情变大


fa72cd0638cf6f5726c386aa9c6e0462_(1).png


dsf.jpg


72330123222353391.jpg

class CAffiche
{
private textfiled:Laya.HTMLDivElement;
public Reset():void
{
gRoomView.chatBox.innerHTML = "";
gRoomView.chatBox.height = 1;

}

public SysSay(txt:string):void
{
this.AddChat(0, "法官", txt);
}

public PlayerSay(msg:any):void
{
this.AddChat(msg['from_client_seatsno'], msg['from_client_name'], msg['content']);
}

private AddChat(seat:number, name:string, txt:string)
{
let paopao = new ui.langren.room.SayBoardUI();
paopao.x = 10;
paopao.lbSayName.text = name;

let div:Laya.HTMLDivElement = new Laya.HTMLDivElement();
div.style.lineHeight = 36;
div.style.fontSize = 26;
div.style.valign = "middle";
// div.style.fontFamily = "Microsoft YaHei";
div.style.width = 200;
div.style.color = "#black";
for(let i=0; i<FaceView.faceArray.length; i++)
{
txt = txt.replace(FaceView.repl,'<img src="res/face/face'+i+'.png" style="width:36px;height:36px;position:relative;top:30px;"></img>');
}
div.pos(30,5);
div.innerHTML = txt;
div.width = div.contextWidth;
if(div.contextWidth > 200) div.contextWidth = 200;
console.log(div.contextWidth);
paopao.y = gRoomView.chatBox.height;
paopao.imgSayBg.height = div.contextHeight + 26;
paopao.imgSayBg.width = div.contextWidth + 60;
paopao.height = paopao.imgSayBg.height + 50;
paopao.width = paopao.imgSayBg.width + 20;
paopao.imgSayBg.x = 50;
paopao.sayHead.x = 0;
if(seat != 0)
{
if(seat == me.mSeat)
{
div.style.color = "#ffffff";
paopao.lbSayName.text = "我";
paopao.imgSayBg.skin = "res/room/mysay.png";
paopao.imgSayBg.right = 50;
paopao.sayHead.right = 0;
paopao.right =0;
div.pos(20,5);

}
paopao.seatNum.index = seat - 1;
}
else
{
div.style.color = "#000000";
paopao.seatNum.visible = false;
paopao.seatBg.visible = false;
paopao.imgSayBg.skin = "res/room/othersay.png";
paopao.imgJudge.visible = true;
}
paopao.imgSayBg.addChild(div);
gRoomView.chatBox.addChild(paopao);

//更新高度
gRoomView.chatBox.height = gRoomView.chatBox.height + paopao.height;
gRoomView.chatPanel.refresh();
gRoomView.chatPanel.vScrollBar.value = gRoomView.chatPanel.vScrollBar.max; //设置滚动条在最下方
}
}
已邀请:

cuixueying

赞同来自:

请提供可以运行的源码示例,谢谢!

18336093936

赞同来自:

72330123222353391.jpg


fa72cd0638cf6f5726c386aa9c6e0462_(1).png


dsf.jpg

 

要回复问题请先

商务合作
商务合作