Project1

标题: 选项框的位置 / 替换选项框的背景色 [打印本页]

作者: 3eki    时间: 2025-5-11 02:21
标题: 选项框的位置 / 替换选项框的背景色
第一次发贴,写了两个简单的插件。


1. 选项框的位置
2. 选项框的非选择项背景色默认是灰色,想做一些修改可以直接在插件管理器里设置色号。






https://github.com/SekiShiyo/RMMZ/blob/main/NonSelectedChoiceBG.js

https://github.com/SekiShiyo/RMMZ/blob/main/ChoiceBoxPosition.js
作者: 3eki    时间: 2025-5-11 02:24
  1. /*:
  2. * @target MZ
  3. * @plugindesc Lets you customize the X and Y position of the choice list window (Window_ChoiceList) in RPG Maker MZ.
  4. * @author SekiShiyo
  5. *
  6. * @param ChoiceX
  7. * @text Choice Window X
  8. * @desc X position of the choice window
  9. * @default 240
  10. *
  11. * @param ChoiceY
  12. * @text Choice Window Y
  13. * @desc Y position of the choice window
  14. * @default 360
  15. */

  16. (() => {
  17.     const params = PluginManager.parameters("ChoiceBoxPosition");
  18.     const choiceX = Number(params["ChoiceX"] || 240);
  19.     const choiceY = Number(params["ChoiceY"] || 360);
  20.   
  21.     const _Window_ChoiceList_updatePlacement = Window_ChoiceList.prototype.updatePlacement;
  22.     Window_ChoiceList.prototype.updatePlacement = function () {
  23.       _Window_ChoiceList_updatePlacement.call(this);
  24.       this.x = choiceX;
  25.       this.y = choiceY;
  26.     };
  27.   })();
  28.   
复制代码





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