请问在RPG Maker MZ中如何更改UI中黑色的半透明图片?
我尝试编辑了“img”文件夹中的“system”图片,但并没有变化。
如果有可以更改图片的插件,请告诉我。
如果只是为了将透明变为不透明。除了修改System图片,你还需要在数据库-系统 2-进阶设置中修改「窗口不透明度」这一项,修改为255(不透明度范围是0~255)。
如果修改后还是没有效果,也可以检查一下插件。部分插件会修改窗口的不透明度。
可选项背后的渐变背景并非图片,而是由引擎绘制的。
以下是为可选项窗口绘制该背景的代码部分:
Window_Selectable.prototype.drawBackgroundRect = function(rect) {
const c1 = ColorManager.itemBackColor1();
const c2 = ColorManager.itemBackColor2();
const x = rect.x;
const y = rect.y;
const w = rect.width;
const h = rect.height;
this.contentsBack.gradientFillRect(x, y, w, h, c1, c2, true);
this.contentsBack.strokeRect(x, y, w, h, c1);
};
以下是它所使用的颜色。默认情况下,这些都是硬编码的。
ColorManager.itemBackColor1 = function() {
return "rgba(32, 32, 32, 0.5)";
};
ColorManager.itemBackColor2 = function() {
return "rgba(0, 0, 0, 0.5)";
};