Project1
标题:
我换了对话框的图片皮肤,但是文字出框了怎么办
[打印本页]
作者:
playboy_ng
时间:
2024-4-1 19:33
标题:
我换了对话框的图片皮肤,但是文字出框了怎么办
如图,文字左边超出了框,能不能把对话框里面针对文本的内边距缩小.
用的是Drill大佬的插件
S~X3})6RS`RD)WBD9A%CQGB.png
(37.62 KB, 下载次数: 5)
下载附件
保存到相册
2024-4-1 19:33 上传
作者:
505681468
时间:
2024-4-1 20:49
本帖最后由 505681468 于 2024-4-1 20:54 编辑
可能是这几个?
padding好像没有左右上下边距的单独设定,所以设定后的 contents 位置 x=y。
如果不符合需求的话,可能需要自定义了
// 创建 contents
Window_Base.prototype.createContents = function() {
this.contents = new Bitmap(this.contentsWidth(), this.contentsHeight());
this.resetFontSettings();
};
// 窗口内填充距离
Window_Base.prototype.standardPadding = function() {
return 18;
};
// contents 宽度
Window_Base.prototype.contentsWidth = function() {
return this.width - this.standardPadding() * 2;
};
// contents 高度
Window_Base.prototype.contentsHeight = function() {
return this.height - this.standardPadding() * 2;
};
// contents 位置刷新
Window.prototype._refreshContents = function() {
this._windowContentsSprite.move(this.padding, this.padding);
};
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1