[]最新版本 1.7.5 beta fontClip
这个功能比较鸡肋,我在做项目的时候也自定义写了一个和这个一样的功能! 但是这个 无法右对齐,居中对齐(我的可以), 而且设置长宽之后, 任意修改数值之后,就会变成默认长宽了!
建议,正式版优化一下,我就可以把我自己的删了! 用官方的!
建议,正式版优化一下,我就可以把我自己的删了! 用官方的!
没有找到相关结果
已邀请:
要回复问题请先登录
4 个回复
cuixueying
赞同来自:
a13121527420 - 哇啦哇啦哇啦!
赞同来自:
_index = value;
if (_bitmap && _sources) {
this.graphics.clear();
var splitArr:Array = value.toString().split('');
for (var i:int = 0; i < splitArr.length; i++) {
var te:Texture = _sources[splitArr[i]] as Texture;
if (_align != "right") {
this.graphics.drawTexture(te, i * te.width, 0, te.width, te.height);
} else {
this.graphics.drawTexture(te, this.width - ((splitArr.length - i) * te.width), 0, te.width, te.height);
}
}
}
event(Event.CHANGE);
}
a13121527420 - 哇啦哇啦哇啦!
赞同来自:
a13121527420 - 哇啦哇啦哇啦!
赞同来自:
public function set index(value:int):void {
_index = value;
if (_bitmap && _sources) {
this.graphics.clear();
var splitArr:Array = value.toString().split('');
for (var i:int = 0; i < splitArr.length; i++) {
var te:Texture = _sources[splitArr[i]] as Texture;
if (_align == "left") {
this.graphics.drawTexture(te, i * te.width, 0, te.width, te.height);
} else if (_align == "right") {
this.graphics.drawTexture(te, this.width - ((splitArr.length - i) * te.width), 0, te.width, te.height);
} else if (_align == 'center') {
this.graphics.drawTexture(te, ((this.width - (te.width * splitArr.length)) / 2) + (i * te.width))
}
}
}
event(Event.CHANGE);
}