查看: 3615|回复: 2

[有事请教] 血条上文字字体求助

[复制链接]
梦石
0
星屑
1393
在线时间
137 小时
注册时间
2017-9-28
回帖
6
发表于 2018-1-31 15:05:49 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
最近在学习修改UI,但是遇到了困难,遂求助论坛,我个人希望能修改成下面的字体↓
002.png

于是我找到了[this._numberImg.width / 10,this._numberImg.height],修改了图片,但发现这个方法并不适用于斜体字,于是变成了这样↓
001.png

在此向各位大佬求助,希望不吝赐教
1.我希望能够在代码中插入我希望使用的某字体,加粗,斜体,描边,字号。
2.我希望能教教我如何在字体前加上“HP”二字,同样字体,加粗,斜体,描边,字号。

附上原代码,取自MOG插件。
//==============================
// * create HP Number
//==============================
MCharStatus.prototype.createHPNumber = function() {
    this._hp_number = [];
        this._NumberData = [this._numberImg.width / 10,this._numberImg.height]
        var x = this._layout.x + Moghunter.scMenu_HPNumberX;
        var y = this._layout.y + Moghunter.scMenu_HPNumberY;
        for (var i = 0; i < 5; i++) {
                 this._hp_number = new Sprite(this._numberImg);
                 this._hp_number.visible = false;
                 this._hp_number.opacity = 255;
                 this._hp_number.x = x ;
                 this._hp_number.y = y ;
                 this._hp_number.fontSize = 33 ;
                 this.addChild(this._hp_number);
        };       
        this.refresh_number(this._hp_number,this._actor.hp,this._NumberData,x)
};
梦石
0
星屑
5343
在线时间
683 小时
注册时间
2016-2-11
回帖
120
发表于 2018-1-31 15:10:37 | 显示全部楼层
MOG血条框跟数值都是用图片的吧

评分

参与人数 1赞 +1 收起 理由
白嫩白嫩的 + 1 认可答案

查看全部评分

回复 1 0

使用道具 举报

梦石
0
星屑
1393
在线时间
137 小时
注册时间
2017-9-28
回帖
6
 楼主| 发表于 2018-1-31 21:28:54 | 显示全部楼层
所以我在问用字体的办法啊。。。话说图片的话有办法在保持字块不冲突的情况下缩短间距吗?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部