[]最新版本 1.7.5 beta fontClip

这个功能比较鸡肋,我在做项目的时候也自定义写了一个和这个一样的功能! 但是这个 无法右对齐,居中对齐(我的可以), 而且设置长宽之后, 任意修改数值之后,就会变成默认长宽了!
建议,正式版优化一下,我就可以把我自己的删了! 用官方的!
已邀请:

cuixueying

赞同来自:

很感谢你的建议,麻烦把你的fontclip发我们下,我们看下问题,谢谢!

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 != "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 - 哇啦哇啦哇啦!

赞同来自:

其实最完美的就是可以布局,然后还可以在前后加描述问题, 例如: 1234万 , 金币1213万! 你们可以先加上布局到时候我在在你们的上面去 弄一个自己用的!

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);
        }

要回复问题请先

商务合作
商务合作