查看: 2471|回复: 1

[有事请教] 怎么把菜单中的HP槽和MP槽加长?

[复制链接]
梦石
0
星屑
194
在线时间
40 小时
注册时间
2021-8-26
回帖
16
发表于 2021-8-30 01:30:11 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 逸生ya 于 2021-8-30 01:32 编辑

如题,需要插件还是改代码?

这个原版显示

这个原版显示

这个是改过的

这个是改过的
肝就完了
梦石
0
星屑
10274
在线时间
1919 小时
注册时间
2020-1-2
回帖
1043
发表于 2021-9-4 19:02:07 | 显示全部楼层
[pre lang="javascript" line="587" file="rpg_windows"]Window_Base.prototype.drawActorSimpleStatus = function(actor, x, y, width) {
    var lineHeight = this.lineHeight();
    var x2 = x + 180;
    var width2 = Math.min(200, width - 180 - this.textPadding());
    this.drawActorName(actor, x, y);
    this.drawActorLevel(actor, x, y + lineHeight * 1);
    this.drawActorIcons(actor, x, y + lineHeight * 2);
    this.drawActorClass(actor, x2, y);
    this.drawActorHp(actor, x2, y + lineHeight * 1, width2);
    this.drawActorMp(actor, x2, y + lineHeight * 2, width2);
};[/pre]
这个是菜单的   如果状态也需要的话再找我
打开工程文件的JS里面有一个rpg_windows.js你可以用记事本或者DW打开  
然后找到这一串代码   
如何修改  width2 这个是宽度 你可以修改基础值var width2 = Math.min(200, width - 180 - this.textPadding());
或则直接在 this.drawActorHp(actor, x2, y + lineHeight * 1, width2 * 2);基础值 X 2长度
虽然你HP显示条长度增加但是需要修改X2位置因为X2相当于显示起点
如果还有不会的可以加群问吧  727783732  密码5378938
QQ图片20210904185936.png

评分

参与人数 1赞 +1 收起 理由
逸生ya + 1 认可答案

查看全部评分

B站没人气的夏目漠漠,直播间:5378938实用插件教程点击红字传送
回复 1 0

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部