查看: 2017|回复: 2

[有事请教] 请问如何改变地名的显示位置?

[复制链接]
梦石
0
星屑
5269
在线时间
733 小时
注册时间
2013-1-18
回帖
525
发表于 2022-9-3 10:55:11 | 显示全部楼层 |阅读模式

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

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

×
进入新地图时左上角会显示地图名,我想让它显示在中间,或者右上角。请问该怎么修改呢?
梦石
0
星屑
2429
在线时间
363 小时
注册时间
2021-2-8
回帖
137
发表于 2022-9-3 19:02:23 | 显示全部楼层
window.js 里找到下面这段

//-----------------------------------------------------------------------------
// Window_MapName
//
// The window for displaying the map name on the map screen.

function Window_MapName() {
    this.initialize.apply(this, arguments);
}

Window_MapName.prototype = Object.create(Window_Base.prototype);
Window_MapName.prototype.constructor = Window_MapName;

Window_MapName.prototype.initialize = function() {
    var wight = this.windowWidth();
    var height = this.windowHeight();
    Window_Base.prototype.initialize.call(this, 0, 0, wight, height);  //标红的是XY坐标自己调
    this.opacity = 0;
    this.contentsOpacity = 0;
    this._showCount = 0;
    this.refresh();
};

Window_MapName.prototype.open = function() {
    this.refresh();
    this._showCount = 150; //这个数字越大显示的时间越久
};

点评

太感谢了,大佬!完美解决。  发表于 2022-9-3 19:41
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部