Egret 使用遇到的問題總結(二)

1、修改eui.button圖片

public static SetButtonImage(pBtn: eui.Button, str: string) {
	var image: eui.Image = <eui.Image>pBtn.getChildAt(0);
	if (image != undefined) {
		image.source = str;
	}
}

 

this.btn.getChildAt(0).pixelHitTest = true; //設置圖片透明區域點擊無效,可以穿透!

  

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章