// // ポップアップメッセージ ver1.02 // // ------------------------------------------------------ // Copyright (c) 2016 Yana // Released under the MIT license // http://opensource.org/licenses/mit-license.php // ------------------------------------------------------ // // author Yana // var Imported = Imported || {}; Imported['PopupMessage'] = 1.02; if (!Imported.CommonPopupCore) { console.error('CommonPopupCoreを導入してください。') } /*: * @plugindesc ver1.02/メッセージの表示をポップアップに変更する制御文字_pum[delay,x,y,action]を追加します。 * @author Yana * * @param Pop Message FontSize * @desc ポップアップメッセージのデフォルトフォントサイズです。 * @default 28 * * @param Pop Message Count * @desc ポップアップメッセージの表示時間です。 * @default 120 * * @help プラグインコマンドはありません。 * * メッセージの表示のメッセージの中に_pum[delay,x,y,action,pattern]と記述することで、 * メッセージをポップアップに変更します。 * delayはディレイ値で、この値フレーム分待ってから、ポップアップを行います。 * xは表示位置のX座標です。未指定の場合は、0が設定されます。 * yは表示位置のY座標です。未指定の場合は、画面高さ-ポップアップの高さが設定されます。 * actionはアクション形式です。1を指定すると、上から下にアクションします。 * patternは動作パターンです。Normalで今まで通り、GrowUpでにょき、Stretchでうにょーんとなります。 * ------------------------------------------------------ * 利用規約 * ------------------------------------------------------ * 当プラグインはMITライセンスで公開されています。 * 使用に制限はありません。商用、アダルト、いずれにも使用できます。 * 二次配布も制限はしませんが、サポートは行いません。 * 著作表示は任意です。行わなくても利用できます。 * 要するに、特に規約はありません。 * バグ報告や使用方法等のお問合せはネ実ツクールスレ、または、Twitterにお願いします。 * https://twitter.com/yanatsuki_ * 素材利用は自己責任でお願いします。 * ------------------------------------------------------ * このプラグインには「汎用ポップアップベース」のプラグインが必要です。 * 汎用ポップアップベースより下に配置してください。 * ------------------------------------------------------ * 更新履歴: * ver1.02: * 動作パターンの設定を追加。 * ver1.01: * 表示位置を調整する機能を追加。 * ver1.00: * 公開 */ (function() { var parameters = PluginManager.parameters('PopupMessage'); var popMesFontSize = Number(parameters['Pop Message FontSize'] || 28); var popMesCount = Number(parameters['Pop Message Count'] || 120); var popMesSlide = Number(parameters['Pop Message Slide'] || 60); var popMesRegExp = /_PUM\[(\d+),?(\d+)?,?(\d+)?,?(\d+)?,?(.+?)?\]/gi; var _pMes_GInterpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; Game_Interpreter.prototype.pluginCommand = function(command, args) { _pMes_GInterpreter_pluginCommand.call(this, command, args); if (command === 'PopupMessage') { } }; var _pMes_GInterpreter_c101 = Game_Interpreter.prototype.command101; Game_Interpreter.prototype.command101 = function(){ var texts = []; var pIndex = this._index; var param = {'delay':null}; while (this.nextEventCode() === 401){ this._index++; texts.push(this.currentCommand().parameters[0]); } for(var i=0;i