Project1

标题: 我换了对话框的图片皮肤,但是文字出框了怎么办 [打印本页]

作者: playboy_ng    时间: 2024-4-1 19:33
标题: 我换了对话框的图片皮肤,但是文字出框了怎么办
如图,文字左边超出了框,能不能把对话框里面针对文本的内边距缩小.
用的是Drill大佬的插件

S~X3})6RS`RD)WBD9A%CQGB.png (37.62 KB, 下载次数: 5)

S~X3})6RS`RD)WBD9A%CQGB.png

作者: 505681468    时间: 2024-4-1 20:49
本帖最后由 505681468 于 2024-4-1 20:54 编辑

可能是这几个?
padding好像没有左右上下边距的单独设定,所以设定后的 contents 位置 x=y。
如果不符合需求的话,可能需要自定义了


  1. // 创建 contents
  2. Window_Base.prototype.createContents = function() {
  3.     this.contents = new Bitmap(this.contentsWidth(), this.contentsHeight());
  4.     this.resetFontSettings();
  5. };
  6. // 窗口内填充距离
  7. Window_Base.prototype.standardPadding = function() {
  8.     return 18;
  9. };
  10. // contents 宽度
  11. Window_Base.prototype.contentsWidth = function() {
  12.     return this.width - this.standardPadding() * 2;
  13. };
  14. // contents 高度
  15. Window_Base.prototype.contentsHeight = function() {
  16.     return this.height - this.standardPadding() * 2;
  17. };
  18. // contents 位置刷新
  19. Window.prototype._refreshContents = function() {
  20.     this._windowContentsSprite.move(this.padding, this.padding);
  21. };
复制代码





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1