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

Project1

 找回密码
 注册会员
搜索
查看: 6921|回复: 17

[搬运汉化] 行动目标,任务要求 指引窗口插件 DestinationWindow

[复制链接]

Lv5.捕梦者

梦石
0
星屑
20336
在线时间
123 小时
注册时间
2019-5-18
帖子
68
发表于 2019-12-16 01:39:17 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
找到了一个游戏指引提示窗口的插件
把他汉化了一下

在地图上显示行动目标窗口。
因为它可以显示包括控制字符在内的任何字符串,所以可以用于各种目的。
*要显示的内容是插件命令,是否显示它们由开关控制。
*
*启用自动调整后,如果文本不适合窗口,则将自动调整文本。
*但是,以下控制字符无效。
\i[n]、\c[n]、\{、\}

插件命令详细信息
*从事件命令“插入命令”执行。
*(参数之间用空格分隔)

DW_目标设定 aaa                    # 设置行动目标为 aaa
DW_SET_DESTINATION aaa             # 同上
DW_图标_目标设定 1 aaa      # 设置带有图标的目标要求 aaa   1=图标ID
DW_SET_DESTINATION_WITH_ICON 1 aaa # 同上



QQ截图20191216013144.png



QQ截图20191216012307.png


普通窗口
QQ截图20191216012236.png



带图标窗口
QQ截图20191216012251.png


DestinationWindow.zip (3.75 KB, 下载次数: 160, 售价: 3 星屑)

评分

参与人数 2+2 收起 理由
ssdgua + 1 塞糖
白嫩白嫩的 + 1 感谢楼主分享

查看全部评分

Lv3.寻梦者

梦石
0
星屑
3409
在线时间
1154 小时
注册时间
2016-8-9
帖子
2383

开拓者

发表于 2019-12-16 08:39:18 | 显示全部楼层
我点进原作者的GitHub 发现这个插件有最新版1.6了
酸酸甜甜就④哇噢
回复 支持 1 反对 0

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
5462
在线时间
1556 小时
注册时间
2011-6-14
帖子
520
发表于 2019-12-16 09:28:42 | 显示全部楼层
好像不错  谢谢
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
20336
在线时间
123 小时
注册时间
2019-5-18
帖子
68
 楼主| 发表于 2019-12-16 15:45:32 | 显示全部楼层
白嫩白嫩的 发表于 2019-12-16 08:39
我点进原作者的GitHub 发现这个插件有最新版1.6了

有科学上网工具吗

点评

目前科学上网的东西都收费,而且不便宜,也不敢买,就怕冲了一年用不了几天就倒了  发表于 2019-12-17 11:20
..我这边打不开啊,地址是新疆乌鲁木齐, 百度云打不开,YY打不开,还有等等,这边屏蔽的厉害  发表于 2019-12-17 01:21
github直接就能打开啊,我也没科学上网工具,很多外网都打不开  发表于 2019-12-16 21:21
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
14152
在线时间
718 小时
注册时间
2011-7-16
帖子
1428

开拓者

发表于 2019-12-16 22:06:55 | 显示全部楼层
不错不错,支持楼主分享
RMMV网络插件,开源免费,内含服务器端,无需强制登录,云数据,弹幕,云存档,排名,兑换码,版本检测,可自由上架下架删除。q群399090587
免打包运行MV游戏,云游戏,安卓App雷神游戏厅,在线玩游戏,上传下载游戏
开源游戏:重装机兵之重装归来【RMMV制作】全球首款按照美剧分季分集的方式发布的游戏
体素画 -- MV画3D像素图的画板
RMMV显示3D模型和场景的插件
RMMV显示spine骨骼动画的插件
RMMV秘密通道插件
突破敌群数量上限8个的插件
在rmmv中显示gif动态图片的插件
一款可以在mv游戏界面的任意位置显示任意文字的插件
RMMV Toast 插件 带物品得失提示,可以设置开启关闭 兼容yep itemcore
制作一个改名卡道具插件、调整标题页面菜单的插件、在标题页面之前显示大段文字的插件、标题页面显示版本号的插件
物品得失自动提示自动上色自动换行插件
我的Q群 663889472
另外,我的插件、范例、游戏都在这里
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv3.寻梦者

梦石
0
星屑
2379
在线时间
912 小时
注册时间
2014-10-14
帖子
1331

开拓者

发表于 2019-12-16 23:38:33 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
5462
在线时间
1556 小时
注册时间
2011-6-14
帖子
520
发表于 2019-12-17 13:03:03 | 显示全部楼层
不谢
  1. //=============================================================================
  2. // DestinationWindow.js
  3. // ----------------------------------------------------------------------------
  4. // Copyright (c) 2015-2017 Triacontane
  5. // This software is released under the MIT License.
  6. // http://opensource.org/licenses/mit-license.php
  7. // ----------------------------------------------------------------------------
  8. // Version
  9. // 1.6.0-SNAPSHOT 2019/06/24 特定マップで非表示にする機能を追加
  10. // 1.5.0 2018/07/20 行動目標ウィンドウの内容を複数行表示できる機能を追加
  11. // 1.4.0 2017/11/15 行動目標ウィンドウの文字列揃えを中央揃え、右揃えにできる機能を追加
  12. // 1.3.0 2017/11/11 マップ画面のウィンドウを一定時間で消去できる機能を追加
  13. // 1.2.1 2017/05/22 専用ウィンドウスキンを指定した状態でセーブ&ロードした際にテキスト色が黒くなる問題を修正
  14. // 1.2.0 2017/05/03 アイコン表示機能、横幅自動調整機能を追加、別の目標を指定したときに重なって表示される問題を修正
  15. // 1.1.0 2017/05/02 メニュー画面にも表示できる機能を追加
  16. // 1.0.0 2017/05/02 初版
  17. // ----------------------------------------------------------------------------
  18. // [Blog]   : http://triacontane.blogspot.jp/
  19. // [Twitter]: https://twitter.com/triacontane/
  20. // [GitHub] : https://github.com/triacontane/
  21. //=============================================================================

  22. /*:
  23. * @plugindesc DestinationWindowPlugin
  24. * @author triacontane
  25. *
  26. * @param ShowingSwitchId
  27. * @desc 行動目標ウィンドウが表示されるスイッチIDです。
  28. * @default 1
  29. * @type switch
  30. *
  31. * @param CloseEventRunning
  32. * @desc イベントが実行されている間はウィンドウを閉じます。
  33. * @default true
  34. * @type boolean
  35. *
  36. * @param WindowX
  37. * @desc ウィンドウのX横幅です。
  38. * @default 24
  39. * @type number
  40. *
  41. * @param WindowY
  42. * @desc ウィンドウのY横幅です。
  43. * @default 24
  44. * @type number
  45. *
  46. * @param WindowWidth
  47. * @desc ウィンドウの横幅です。
  48. * @default 320
  49. * @type number
  50. *
  51. * @param WindowOpacity
  52. * @desc ウィンドウの不透明度です。
  53. * @default 255
  54. * @type number
  55. *
  56. * @param WindowSkin
  57. * @desc ウィンドウスキンのファイル名(img/system)です。拡張子不要。
  58. * @default
  59. * @require 1
  60. * @dir img/system/
  61. * @type file
  62. *
  63. * @param FadeFrame
  64. * @desc ウィンドウのフェードイン、フェードアウト時間(フレーム数)です。
  65. * @default 8
  66. * @type number
  67. *
  68. * @param FontSize
  69. * @desc ウィンドウのフォントサイズです。
  70. * @default 22
  71. * @type number
  72. *
  73. * @param ShowingInMenu
  74. * @desc 行動目標ウィンドウをメニュー画面にも表示します。ただし座標やサイズは自働で整形されます。
  75. * @default false
  76. * @type boolean
  77. *
  78. * @param AutoAdjust
  79. * @desc 指定した文字列がウィンドウに収まらない場合に自働で調整します。ただし一部の制御文字が使用不可となります。
  80. * @default true
  81. * @type boolean
  82. *
  83. * @param ShowingFrames
  84. * @desc 行動目標ウィンドウの表示フレーム数です。0を指定すると常時表示されます。
  85. * @default 0
  86. * @type number
  87. *
  88. * @param TextAlign
  89. * @desc 文字列の揃えです。
  90. * @default 0
  91. * @type select
  92. * @option Left
  93. * @value 0
  94. * @option Center
  95. * @value 1
  96. * @option Right
  97. * @value 2
  98. *
  99. * @param NoDestinationMaps
  100. * @desc 非表示にしたいマップIDリスト
  101. * @default []
  102. * @type number[]
  103. *
  104. * @help マップ中に行動目標ウィンドウを表示します。
  105. * 制御文字を含めた好きな文字列を表示できるので様々な用途に使えます。
  106. * 表示する内容はプラグインコマンドで、表示可否はスイッチで制御します。
  107. *
  108. * 自動調整を有効にした場合、文字列がウィンドウに収まらない場合に自働で調整します。
  109. * ただし、以下の制御文字が無効になります。
  110. * \i[n]、\c[n]、\{、\}
  111. *
  112. * プラグインコマンド詳細
  113. *  イベントコマンド「プラグインコマンド」から実行。
  114. *  (パラメータの間は半角スペースで区切る)
  115. *
  116. * DW_目標設定 aaa                    # 行動目標を「aaa」に設定します。
  117. * DW_SET_DESTINATION aaa             # 同上
  118. * DW_アイコン付き目標設定 1 aaa      # アイコン[1]付きで行動目標設定。
  119. * DW_SET_DESTINATION_WITH_ICON 1 aaa # 同上
  120. *
  121. * This plugin is released under the MIT License.
  122. */
  123. /*:ja
  124. * @plugindesc 行動目標ウィンドウプラグイン
  125. * @author トリアコンタン
  126. *
  127. * @param 表示スイッチID
  128. * @desc 行動目標ウィンドウが表示されるスイッチIDです。
  129. * @default 1
  130. * @type switch
  131. *
  132. * @param イベント中は閉じる
  133. * @desc イベントが実行されている間はウィンドウを閉じます。
  134. * @default true
  135. * @type boolean
  136. *
  137. * @param ウィンドウX座標
  138. * @desc ウィンドウのX横幅です。
  139. * @default 24
  140. * @type number
  141. *
  142. * @param ウィンドウY座標
  143. * @desc ウィンドウのY横幅です。
  144. * @default 24
  145. * @type number
  146. *
  147. * @param ウィンドウ横幅
  148. * @desc ウィンドウの横幅です。
  149. * @default 320
  150. * @type number
  151. *
  152. * @param ウィンドウ不透明度
  153. * @desc ウィンドウの不透明度です。
  154. * @default 255
  155. * @type number
  156. *
  157. * @param ウィンドウスキン名
  158. * @desc ウィンドウスキンのファイル名(img/system)です。拡張子不要。
  159. * @default
  160. * @require 1
  161. * @dir img/system/
  162. * @type file
  163. *
  164. * @param フェード時間
  165. * @desc ウィンドウのフェードイン、フェードアウト時間(フレーム数)です。
  166. * @default 8
  167. * @type number
  168. *
  169. * @param フォントサイズ
  170. * @desc ウィンドウのフォントサイズです。
  171. * @default 22
  172. * @type number
  173. *
  174. * @param メニュー画面に表示
  175. * @desc 行動目標ウィンドウをメニュー画面にも表示します。ただし座標やサイズは自働で整形されます。
  176. * @default false
  177. * @type boolean
  178. *
  179. * @param 自働調整
  180. * @desc 指定した文字列がウィンドウに収まらない場合に自働で調整します。ただし一部の制御文字が使用不可となります。
  181. * @default true
  182. * @type boolean
  183. *
  184. * @param 表示フレーム数
  185. * @desc 行動目標ウィンドウの表示フレーム数です。0を指定すると常時表示されます。
  186. * @default 0
  187. * @type number
  188. *
  189. * @param 文字列揃え
  190. * @desc 文字列の揃えです。
  191. * @default 0
  192. * @type select
  193. * @option 左揃え
  194. * @value 0
  195. * @option 中央揃え
  196. * @value 1
  197. * @option 右揃え
  198. * @value 2
  199. *
  200. * @param NoDestinationWindowMapIds
  201. * @desc 非表示にしたいマップIDリスト
  202. * @default []
  203. * @type number[]
  204. *
  205. * @help マップ中に行動目標ウィンドウを表示します。
  206. * 制御文字を含めた好きな文字列を表示できるので様々な用途に使えます。
  207. * 表示する内容はプラグインコマンドで、表示可否はスイッチで制御します。
  208. *
  209. * 自動調整を有効にした場合、文字列がウィンドウに収まらない場合に自働で調整します。
  210. * ただし、以下の制御文字が無効になります。
  211. * \i[n]、\c[n]、\{、\}
  212. *
  213. * 複数行の目標を表示したい場合は、文章中に改行「\n」を挿入してください。
  214. *
  215. * プラグインコマンド詳細
  216. *  イベントコマンド「プラグインコマンド」から実行。
  217. *  (パラメータの間は半角スペースで区切る)
  218. *
  219. * DW_目標設定 aaa                    # 行動目標を「aaa」に設定します。
  220. * DW_SET_DESTINATION aaa             # 同上
  221. * DW_アイコン付き目標設定 1 aaa      # アイコン[1]付きで行動目標設定。
  222. * DW_SET_DESTINATION_WITH_ICON 1 aaa # 同上
  223. *
  224. * 以下のいずれかの条件を満たすマップでは、行動目標ウィンドウは非表示になります。
  225. * - プラグインパラメータ NoDestinationWindowMapIds で指定したIDをを持つ
  226. * - マップのメモ欄に <NoDestinationWindow> と記述されている
  227. *
  228. *
  229. * 利用規約:
  230. *  作者に無断で改変、再配布が可能で、利用形態(商用、18禁利用等)
  231. *  についても制限はありません。
  232. *  このプラグインはもうあなたのものです。
  233. */

  234. (function() {
  235.     'use strict';
  236.     var pluginName    = 'DestinationWindow';
  237.     var metaTagPrefix = 'DW_';

  238.     //=============================================================================
  239.     // ローカル関数
  240.     //  プラグインパラメータやプラグインコマンドパラメータの整形やチェックをします
  241.     //=============================================================================
  242.     var getParamString = function(paramNames) {
  243.         if (!Array.isArray(paramNames)) paramNames = [paramNames];
  244.         for (var i = 0; i < paramNames.length; i++) {
  245.             var name = PluginManager.parameters(pluginName)[paramNames[i]];
  246.             if (name) return name;
  247.         }
  248.         return '';
  249.     };

  250.     var getParamNumber = function(paramNames, min, max) {
  251.         var value = getParamString(paramNames);
  252.         if (arguments.length < 2) min = -Infinity;
  253.         if (arguments.length < 3) max = Infinity;
  254.         return (parseInt(value) || 0).clamp(min, max);
  255.     };

  256.     var getParamBoolean = function(paramNames) {
  257.         var value = getParamString(paramNames);
  258.         return value.toUpperCase() === 'ON' || value.toUpperCase() === 'TRUE';
  259.     };

  260.     var getParamNumberArray = function(paramNames) {
  261.         var value = PluginManager.parameters(pluginName)[paramNames];
  262.         return JSON.parse(value)
  263.             .map(function(e){ return Number(JSON.parse(e)); }, this);
  264.     };

  265.     var getArgNumber = function(arg, min, max) {
  266.         if (arguments.length < 2) min = -Infinity;
  267.         if (arguments.length < 3) max = Infinity;
  268.         return (parseInt(arg) || 0).clamp(min, max);
  269.     };

  270.     var concatAllArguments = function(args) {
  271.         return args.reduce(function(prevValue, arg) {
  272.             return prevValue + ' ' + arg;
  273.         }, '').replace(/^ /, '');
  274.     };

  275.     var setPluginCommand = function(commandName, methodName) {
  276.         pluginCommandMap.set(metaTagPrefix + commandName, methodName);
  277.     };

  278.     //=============================================================================
  279.     // パラメータの取得と整形
  280.     //=============================================================================
  281.     var param                       = {};
  282.     param.showingSwitchId           = getParamNumber(['ShowingSwitchId', '表示スイッチID'], 0);
  283.     param.windowX                   = getParamNumber(['WindowX', 'ウィンドウX座標']);
  284.     param.windowY                   = getParamNumber(['WindowY', 'ウィンドウY座標']);
  285.     param.windowWidth               = getParamNumber(['WindowWidth', 'ウィンドウ横幅'], 1);
  286.     param.windowSkin                = getParamString(['WindowSkin', 'ウィンドウスキン名']);
  287.     param.windowOpacity             = getParamNumber(['WindowOpacity', 'ウィンドウ不透明度']);
  288.     param.fadeFrame                 = getParamNumber(['FadeFrame', 'フェード時間'], 1);
  289.     param.fontSize                  = getParamNumber(['FontSize', 'フォントサイズ'], 12);
  290.     param.closeEventRunning         = getParamBoolean(['CloseEventRunning', 'イベント中は閉じる']);
  291.     param.showingInMenu             = getParamBoolean(['ShowingInMenu', 'メニュー画面に表示']);
  292.     param.autoAdjust                = getParamBoolean(['AutoAdjust', '自働調整']);
  293.     param.showingFrames             = getParamNumber(['ShowingFrames', '表示フレーム数'], 0);
  294.     param.textAlign                 = getParamNumber(['TextAlign', '文字列揃え'], 0);
  295.     param.noDestinationWindowMapIds = getParamNumberArray(['NoDestinationWindowMapIds']);

  296.     var pluginCommandMap = new Map();
  297.     setPluginCommand('目標設定', 'execSetDestination');
  298.     setPluginCommand('SET_DESTINATION', 'execSetDestination');
  299.     setPluginCommand('アイコン付き目標設定', 'execSetDestinationWithIcon');
  300.     setPluginCommand('SET_DESTINATION_WITH_ICON', 'execSetDestinationWithIcon');

  301.     var _extractMetadata = DataManager.extractMetadata;
  302.     DataManager.extractMetadata = function(data) {
  303.         _extractMetadata.call(this, data);
  304.         if (data === $dataMap) {
  305.             if (data.meta.noDestinationWindow) {
  306.                 data.noDestinationWindow = true;
  307.             } else {
  308.                 data.noDestinationWindow = false;
  309.             }
  310.         }
  311.     };

  312.     //=============================================================================
  313.     // Game_Interpreter
  314.     //  プラグインコマンドを追加定義します。
  315.     //=============================================================================
  316.     var _Game_Interpreter_pluginCommand      = Game_Interpreter.prototype.pluginCommand;
  317.     Game_Interpreter.prototype.pluginCommand = function(command, args) {
  318.         _Game_Interpreter_pluginCommand.apply(this, arguments);
  319.         var pluginCommandMethod = pluginCommandMap.get(command.toUpperCase());
  320.         if (pluginCommandMethod) {
  321.             this[pluginCommandMethod](args);
  322.         }
  323.     };

  324.     Game_Interpreter.prototype.execSetDestination = function(args) {
  325.         $gameSystem.setDestinationIcon(null);
  326.         $gameSystem.setDestination(concatAllArguments(args));
  327.     };

  328.     Game_Interpreter.prototype.execSetDestinationWithIcon = function(args) {
  329.         var icon = args.shift();
  330.         $gameSystem.setDestinationIcon(icon);
  331.         $gameSystem.setDestination(concatAllArguments(args));
  332.     };

  333.     //=============================================================================
  334.     // Game_System
  335.     //  目標テキストを追加定義します。
  336.     //=============================================================================
  337.     Game_System.prototype.setDestination = function(value) {
  338.         this._destinationTextList = value.split('\\n');
  339.         this.resetDestinationFrame();
  340.     };

  341.     Game_System.prototype.getDestination = function() {
  342.         return this._destinationTextList || [];
  343.     };

  344.     Game_System.prototype.setDestinationIcon = function(value) {
  345.         this._destinationIconIndex = value;
  346.     };

  347.     Game_System.prototype.getDestinationIcon = function() {
  348.         return this._destinationIconIndex || '';
  349.     };

  350.     Game_System.prototype.resetDestinationFrame = function() {
  351.         this._destinationFrame = 0;
  352.     };

  353.     Game_System.prototype.isOverDestinationFrame = function() {
  354.         this._destinationFrame++;
  355.         return param.showingFrames > 0 ? param.showingFrames <= this._destinationFrame : false;
  356.     };

  357.     //=============================================================================
  358.     // Game_Map
  359.     //  行動目標ウィンドウ非表示マップであるかを判定します。
  360.     //=============================================================================
  361.     Game_Map.prototype.isNoDestinationWindowMap = function () {
  362.         return param.noDestinationWindowMapIds.some(function(mapId){
  363.             return mapId === this.mapId();
  364.         }, this) || $dataMap.noDestinationWindow;
  365.     };

  366.     //=============================================================================
  367.     // Scene_Map
  368.     //  行動目標ウィンドウを生成します。
  369.     //=============================================================================
  370.     var _Scene_Map_createMapNameWindow      = Scene_Map.prototype.createMapNameWindow;
  371.     Scene_Map.prototype.createMapNameWindow = function() {
  372.         this.createDestinationWindow();
  373.         _Scene_Map_createMapNameWindow.apply(this, arguments);
  374.     };

  375.     Scene_Map.prototype.createDestinationWindow = function() {
  376.         this._destinationWindow = new Window_Destination(param.windowX, param.windowY, param.windowWidth);
  377.         this.addChild(this._destinationWindow);
  378.     };

  379.     //=============================================================================
  380.     // Scene_Menu
  381.     //  メニュー画面にも表示できるようにします。
  382.     //=============================================================================
  383.     var _Scene_Menu_create      = Scene_Menu.prototype.create;
  384.     Scene_Menu.prototype.create = function() {
  385.         _Scene_Menu_create.apply(this, arguments);
  386.         if (param.showingInMenu) {
  387.             this.createDestinationWindow();
  388.         }
  389.     };

  390.     Scene_Menu.prototype.createDestinationWindow = function() {
  391.         var y, width, height;
  392.         if (this._commandWindow.maxCols() === 1) {
  393.             y      = this._commandWindow.y + this._commandWindow.height;
  394.             width  = this._commandWindow.width;
  395.             height = null;
  396.         } else {
  397.             y      = this._goldWindow.y;
  398.             width  = param.windowWidth;
  399.             height = this._goldWindow.height;
  400.         }
  401.         this._destinationWindow = new Window_DestinationMenu(0, y, width, height);
  402.         this.addWindow(this._destinationWindow);
  403.     };

  404.     //=============================================================================
  405.     // Window_Destination
  406.     //  行動目標ウィンドウです。
  407.     //=============================================================================
  408.     function Window_Destination() {
  409.         this.initialize.apply(this, arguments);
  410.     }

  411.     Window_Destination.prototype             = Object.create(Window_Base.prototype);
  412.     Window_Destination.prototype.constructor = Window_Destination;

  413.     Window_Destination.prototype.initialize = function(x, y, width, height) {
  414.         Window_Base.prototype.initialize.call(this, x, y, width, height || this.fittingHeight(1));
  415.         this._text      = '';
  416.         this._textList  = [];
  417.         this._iconIndex = 0;
  418.         this.update();
  419.         this.opacity = this.isVisible() ? 255 : 0;
  420.     };

  421.     Window_Destination.prototype.loadWindowskin = function() {
  422.         if (param.windowSkin) {
  423.             this.windowskin = ImageManager.loadSystem(param.windowSkin);
  424.         } else {
  425.             Window_Base.prototype.loadWindowskin.call(this);
  426.         }
  427.     };

  428.     Window_Destination.prototype.lineHeight = function() {
  429.         return Math.max(this.standardFontSize() + 8, Window_Base._iconHeight);
  430.     };

  431.     Window_Destination.prototype.standardFontSize = function() {
  432.         return param.fontSize || Window_Base.prototype.standardFontSize.call(this);
  433.     };

  434.     Window_Destination.prototype.standardBackOpacity = function() {
  435.         return param.windowOpacity || Window_Base.prototype.standardBackOpacity.call(this);
  436.     };

  437.     Window_Destination.prototype.standardPadding = function() {
  438.         return 12;
  439.     };

  440.     Window_Destination.prototype.update = function() {
  441.         Window_Base.prototype.update.call(this);
  442.         if (!this.windowskin.isReady()) return;
  443.         this.updateText();
  444.         this.updateOpacity();
  445.     };

  446.     Window_Destination.prototype.updateOpacity = function() {
  447.         if (this.isVisible()) {
  448.             this.setOpacity(this.opacity + this.getFadeValue());
  449.         } else {
  450.             this.setOpacity(this.opacity - this.getFadeValue());
  451.         }
  452.         this.visible = (this.opacity > 0);
  453.     };

  454.     Window_Destination.prototype.updateText = function() {
  455.         var textList  = $gameSystem.getDestination();
  456.         var iconIndex = getArgNumber(this.convertEscapeCharacters($gameSystem.getDestinationIcon()), 0);
  457.         if (textList.length !== this._textList.length) {
  458.             this.height = this.fittingHeight(textList.length);
  459.             this.createContents();
  460.             this._textList = [];
  461.         }
  462.         textList.forEach(function(text, index) {
  463.             if (this._textList[index] === text && this._iconIndex === iconIndex) {
  464.                 return;
  465.             }
  466.             this._textList[index] = text;
  467.             this._text      = text;
  468.             this._iconIndex = iconIndex;
  469.             this.drawDestination(index);
  470.         }, this);
  471.     };

  472.     Window_Destination.prototype.drawDestination = function(lineNumber) {
  473.         this.contents.clearRect(0, lineNumber * this.lineHeight(), this.contentsWidth(), this.lineHeight());
  474.         var x = this.getContentsX();
  475.         var y = lineNumber * this.lineHeight() + this.lineHeight() / 2 - this.contents.fontSize / 2 - 4;
  476.         if (this._iconIndex > 0 && lineNumber === 0) {
  477.             this.drawIcon(this._iconIndex, x, y);
  478.             x += Window_Base._iconWidth;
  479.         }
  480.         if (param.autoAdjust) {
  481.             this.resetTextColor();
  482.             this.drawText(this._text, x, y, this.contentsWidth() - x);
  483.         } else {
  484.             this.drawTextEx(this._text, x, y);
  485.         }
  486.     };

  487.     Window_Destination.prototype.getContentsX = function() {
  488.         if (param.textAlign === 0) {
  489.             return 0;
  490.         }
  491.         var width = param.autoAdjust ? this.textWidth(this._text) : this.drawTextEx(this._text, 0, -this.lineHeight());
  492.         if (this._iconIndex > 0) {
  493.             width += Window_Base._iconWidth;
  494.         }
  495.         var division = (param.textAlign === 1 ? 2 : 1);
  496.         return this.contentsWidth() / division - width / division;
  497.     };

  498.     Window_Destination.prototype.setOpacity = function(value) {
  499.         this.opacity         = value;
  500.         this.contentsOpacity = value;
  501.     };

  502.     Window_Destination.prototype.getFadeValue = function() {
  503.         return 255 / param.fadeFrame;
  504.     };

  505.     Window_Destination.prototype.isVisible = function() {
  506.         return $gameSwitches.value(param.showingSwitchId) && !this.isEventRunning() && this.isExistText() && !this.isOverFrame() && !this.isNoDestinationWindowMap();
  507.     };

  508.     Window_Destination.prototype.isOverFrame = function() {
  509.         return $gameSystem.isOverDestinationFrame();
  510.     };

  511.     Window_Destination.prototype.isExistText = function() {
  512.         return this._textList.length > 0 || !!this._iconIndex;
  513.     };

  514.     Window_Destination.prototype.isEventRunning = function() {
  515.         return $gameMap.isEventRunning() && param.closeEventRunning;
  516.     };

  517.     Window_Destination.prototype.isNoDestinationWindowMap = function() {
  518.         return $gameMap.isNoDestinationWindowMap();
  519.     };

  520.     //=============================================================================
  521.     // Window_DestinationMenu
  522.     //  メニュー画面の行動目標ウィンドウです。
  523.     //=============================================================================
  524.     function Window_DestinationMenu() {
  525.         this.initialize.apply(this, arguments);
  526.     }

  527.     Window_DestinationMenu.prototype             = Object.create(Window_Destination.prototype);
  528.     Window_DestinationMenu.prototype.constructor = Window_DestinationMenu;

  529.     Window_DestinationMenu.prototype.isOverFrame = function() {
  530.         return false;
  531.     };
  532. })();
复制代码

评分

参与人数 1+1 收起 理由
白嫩白嫩的 + 1 感谢

查看全部评分

回复 支持 1 反对 0

使用道具 举报

Lv2.观梦者

梦石
0
星屑
928
在线时间
93 小时
注册时间
2012-9-23
帖子
54
发表于 2020-1-7 09:55:03 | 显示全部楼层
其实没看懂.....我在插件命令里设置了后似乎没起作用,是还需要设置什么吗
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
68
在线时间
31 小时
注册时间
2009-7-29
帖子
63
发表于 2020-1-29 00:38:38 | 显示全部楼层
感觉挺赞的,谢谢分享
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1478
在线时间
288 小时
注册时间
2020-1-29
帖子
58
发表于 2020-1-29 20:17:22 | 显示全部楼层
对小白来说非常有用,谢谢楼主
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2024-3-28 21:18

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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