设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索

装备栏、状态栏属性过高显示缩小问题

查看数: 386 | 评论数: 4 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2025-4-6 11:29

正文摘要:

大佬们,问个问题,属性太高了,状态栏、装备栏那里显示很小,有没有什么办法显示大一些???

回复

l734273398 发表于 2025-4-11 13:10:10
小秋橙 发表于 2025-4-11 12:12
抱歉让楼主久等了,状态栏中的六项属性相关代码在 rmmz_windows.js 第 2900 行左右。
//---------------- ...

似乎没效果
小秋橙 发表于 2025-4-11 12:12:11
l734273398 发表于 2025-4-6 18:12
完美老哥装备栏那里没问题了,状态栏呢,在那修改呢

抱歉让楼主久等了,状态栏中的六项属性相关代码在 rmmz_windows.js 第 2900 行左右。
JS 代码复制
  1. //-----------------------------------------------------------------------------
  2. // Window_StatusParams
  3. //
  4. // The window for displaying parameters on the status screen.
  5.  
  6. function Window_StatusParams() {
  7.     this.initialize(...arguments);
  8. }
  9.  
  10. Window_StatusParams.prototype = Object.create(Window_StatusBase.prototype);
  11. Window_StatusParams.prototype.constructor = Window_StatusParams;
  12.  
  13. Window_StatusParams.prototype.initialize = function(rect) {
  14.     Window_StatusBase.prototype.initialize.call(this, rect);
  15.     this._actor = null;
  16. };
  17.  
  18. Window_StatusParams.prototype.setActor = function(actor) {
  19.     if (this._actor !== actor) {
  20.         this._actor = actor;
  21.         this.refresh();
  22.     }
  23. };
  24.  
  25. Window_StatusParams.prototype.maxItems = function() {
  26.     return 6;
  27. };
  28.  
  29. Window_StatusParams.prototype.itemHeight = function() {
  30.     return this.lineHeight();
  31. };
  32.  
  33. Window_StatusParams.prototype.drawItem = function(index) {
  34.     const rect = this.itemLineRect(index);
  35.     const paramId = index + 2;
  36.     const name = TextManager.param(paramId);
  37.     const value = this._actor.param(paramId);
  38.     this.changeTextColor(ColorManager.systemColor());
  39.     this.drawText(name, rect.x, rect.y, 160);
  40.     this.resetTextColor();
  41.     this.drawText(value, rect.x + 160, rect.y, 60, "right"); // 这里的 160 和 60 以及上面的 160 非常可疑
  42. };
  43.  
  44. Window_StatusParams.prototype.drawItemBackground = function(/*index*/) {
  45.     //
  46. };
l734273398 发表于 2025-4-6 18:12:47
小秋橙 发表于 2025-4-6 12:33
rmmz_windows.js 第 2580 行附近有以下很多函数,可以试着更改其中的一些数字比如那个 return 48;
...

完美老哥装备栏那里没问题了,状态栏呢,在那修改呢
小秋橙 发表于 2025-4-6 11:29:17
rmmz_windows.js 第 2580 行附近有以下很多函数,可以试着更改其中的一些数字比如那个 return 48;
  1. Window_EquipStatus.prototype.drawAllParams = function() {
  2.     for (let i = 0; i < 6; i++) {
  3.         const x = this.itemPadding();
  4.         const y = this.paramY(i);
  5.         this.drawItem(x, y, 2 + i);
  6.     }
  7. };

  8. Window_EquipStatus.prototype.drawItem = function(x, y, paramId) {
  9.     const paramX = this.paramX();
  10.     const paramWidth = this.paramWidth();
  11.     const rightArrowWidth = this.rightArrowWidth();
  12.     this.drawParamName(x, y, paramId);
  13.     if (this._actor) {
  14.         this.drawCurrentParam(paramX, y, paramId);
  15.     }
  16.     this.drawRightArrow(paramX + paramWidth, y);
  17.     if (this._tempActor) {
  18.         this.drawNewParam(paramX + paramWidth + rightArrowWidth, y, paramId);
  19.     }
  20. };

  21. Window_EquipStatus.prototype.drawParamName = function(x, y, paramId) {
  22.     const width = this.paramX() - this.itemPadding() * 2;
  23.     this.changeTextColor(ColorManager.systemColor());
  24.     this.drawText(TextManager.param(paramId), x, y, width);
  25. };

  26. Window_EquipStatus.prototype.drawCurrentParam = function(x, y, paramId) {
  27.     const paramWidth = this.paramWidth();
  28.     this.resetTextColor();
  29.     this.drawText(this._actor.param(paramId), x, y, paramWidth, "right");
  30. };

  31. Window_EquipStatus.prototype.drawRightArrow = function(x, y) {
  32.     const rightArrowWidth = this.rightArrowWidth();
  33.     this.changeTextColor(ColorManager.systemColor());
  34.     this.drawText("\u2192", x, y, rightArrowWidth, "center");
  35. };

  36. Window_EquipStatus.prototype.drawNewParam = function(x, y, paramId) {
  37.     const paramWidth = this.paramWidth();
  38.     const newValue = this._tempActor.param(paramId);
  39.     const diffvalue = newValue - this._actor.param(paramId);
  40.     this.changeTextColor(ColorManager.paramchangeTextColor(diffvalue));
  41.     this.drawText(newValue, x, y, paramWidth, "right");
  42. };

  43. Window_EquipStatus.prototype.rightArrowWidth = function() {
  44.     return 32;
  45. };

  46. Window_EquipStatus.prototype.paramWidth = function() {
  47.     return 48; // 这里很可疑
  48. };

  49. Window_EquipStatus.prototype.paramX = function() {
  50.     const itemPadding = this.itemPadding();
  51.     const rightArrowWidth = this.rightArrowWidth();
  52.     const paramWidth = this.paramWidth();
  53.     return this.innerWidth - itemPadding - paramWidth * 2 - rightArrowWidth;
  54. };

  55. Window_EquipStatus.prototype.paramY = function(index) {
  56.     const faceHeight = ImageManager.standardFaceHeight;
  57.     return faceHeight + Math.floor(this.lineHeight() * (index + 1.5));
  58. };
复制代码
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-7-2 00:16

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表