cuixueying 我现在js这样写的:
var LabelAtlas=(function(_super){
function LabelAtlas(url,clipX,clipY){
LabelAtlas.__super.call(this);
(clipX===void 0)&& (clipX=1);
(clipY===void 0)&& (clipY=1);
this._clipX=clipX;
this._clipY=clipY;
this.skin=url;
}
__class(LabelAtlas,'laya.customUI.LabelAtlas',_super);
var __proto=LabelAtlas.prototype;
return LabelAtlas;
})(Clip)
xml如下:
<?xml version="1.0" encoding="utf-8"?>
<!-- drag:0-不能拖动,1-水平,2-垂直,3-全部 -->
在编辑器里提示: 创建[LabelAtlas]时遇到错误(手动实例一次本组件可定位错误)
但是在代码里创建LabelAtlas没有任何效果也没有报错。换成Clip就正常显示。