MZ用プラグイン

キーボードで文字入力出来る - InputDialog.js

シェア用テキスト:
▼キーボードで文字入力出来る(kotonoha*様作) - InputDialog.js
https://plugin-mz.fungamemake.com/archives/7090
キーボードで文字を入力し、入力内容を変数に格納するプラグインです。

ふりがな:きーぼーどでもじにゅうりょくできる

機能概要: キーボードで文字を入力し、入力内容を変数に格納するプラグインです。

利用規約(ライセンス): MITライセンス

作者:kotonoha*

作者サイト:https://aokikotori.com/

解説ページ:https://aokikotori.com/archives/2023/04/12/840

ファイル名:InputDialog.js

プラグインのヘルプ:

/*:
 * @target MZ
 * @plugindesc ゲーム内に文字入力ウィンドウを配置するプラグイン
 * オリジナルの入力ウィンドウを作成出来ます。
 *
 * @param fontFileName
 * @text フォントファイル名
 * @desc 使用するフォントのファイル名を指定します。
 * 拡張子まで入れてください。
 * @type string
 * @default 
 * 
 * @param formWidth
 * @text フォームの幅
 * @desc フォームの幅を指定します。
 * @default 400px
 * 
 * @param formHeight
 * @text フォームの高さ
 * @desc フォームの高さを指定します。
 * @default auto
 *
 * @param formBackgroundColor
 * @text フォームの背景色
 * @desc フォームの背景色を指定します。
 * @default rgba(0, 0, 0, 0.5)
 *
 * @param formBorder
 * @text フォームのボーダー情報
 * @desc フォームのボーダー情報を指定します。
 * @default 3px solid #fff
 *
 * @param formBorderRadius
 * @text フォームのボーダー半径
 * @desc フォームのボーダー半径を指定します。
 * @default 5px
 *
 * @param formPadding
 * @text フォームのパディング
 * @desc フォームのパディングを指定します。
 * @default 30px
 *
 * @param labelTextColor
 * @text 表示テキストの文字色
 * @desc 表示テキストの文字色を指定します。
 * @default #FFFFFF
 * 
 * @param labelTextFontSize
 * @text 表示テキストの文字サイズ
 * @desc 表示テキストの文字サイズを指定します。
 * @default 18px
 *
 * @param labelTextMarginBottom
 * @text 表示テキストの下のマージン
 * @desc 表示テキストの下のマージンを指定します。
 * @default 10px
 *
 * @param inputWidth
 * @text テキストフォームの幅
 * @desc テキストフォームの幅を指定します。
 * @default 100%
 *
 * @param inputHeight
 * @text テキストフォームの高さ
 * @desc テキストフォームの高さを指定します。
 * @default 40px
 * 
 * @param inputFontSize
 * @text テキストフォームの文字サイズ
 * @desc テキストフォームの文字サイズを指定します。
 * @default 18px
 * 
 * @param inputColor
 * @text テキストフォームの文字色
 * @desc テキストフォームの文字色を指定します。
 * @default #FFFFFF
 *  
 * @param inputBackgroundColor
 * @text テキストフォームの背景色
 * @desc テキストフォームの背景色を指定します。
 * @default rgba(0, 0, 0, 0.5)
 * 
 * @param inputBorder
 * @text テキストフォームのボーダー情報
 * @desc テキストフォームのボーダーを指定します。
 * @default 1px solid #fff
 * 
 * @param inputBorderRadius
 * @text テキストフォームのボーダー半径
 * @desc テキストフォームのボーダー半径を指定します。
 * @default 5px
 *
 * @param inputPadding
 * @text テキストフォームのパディング
 * @desc テキストフォームのパディングを指定します。
 * @default 5px
 * 
 * @param inputFontSize
 * @text テキストフォームのフォントサイズ
 * @desc テキストフォームのフォントサイズを指定します。
 * @default 18px
 *
 * @param buttonContainerWidth
 * @text ボタンコンテナの幅
 * @desc ボタンコンテナの幅を指定します。
 * @default 100%
 * 
 * @param buttonContainerMargin
 * @text ボタンコンテナのマージン
 * @desc ボタンコンテナのマージンを指定します。
 * @default 15px 0 0 0
 * 
 * @param okButtonWidth
 * @text OKボタンの幅
 * @desc OKボタンの幅を指定します。
 * @default 120px
 * 
 * @param okButtonHeight
 * @text OKボタンの高さ
 * @desc OKボタンの高さを指定します。
 * @default 40px
 * 
 * @param okButtonFontSize
 * @text OKボタンの文字サイズ
 * @desc OKボタンの文字サイズを指定します。
 * @default 18px
 * 
 * @param okButtonColor
 * @text OKボタンの文字色
 * @desc OKボタンの文字色を指定します。
 * @default #FFFFFF
 * 
 * @param okButtonBackgroundColor
 * @text OKボタンの背景色
 * @desc OKボタンの背景色を指定します。
 * @default rgba(0, 0, 0, 0.5)
 * 
 * @param okButtonBorder
 * @text OKボタンのボーダー情報
 * @desc OKボタンのボーダーを指定します。
 * @default 1px solid #fff
 *
 * @param okButtonBorderRadius
 * @text OKボタンのボーダー半径
 * @desc OKボタンのボーダー半径を指定します。
 * @default 5px
 *
 * @param okButtonPadding
 * @text OKボタンのパディング
 * @desc OKボタンのパディングを指定します。
 * @default 5px 10px
 * 
 * @param cancelButtonWidth
 * @text キャンセルボタンの幅
 * @desc キャンセルボタンの幅を指定します。
 * @default 120px
 * 
 * @param cancelButtonHeight
 * @text キャンセルボタンの高さ
 * @desc キャンセルボタンの高さを指定します。
 * @default 40px
 *
 * @param cancelButtonFontSize
 * @text キャンセルボタン
 * @text キャンセルボタンの文字サイズ
 * @desc キャンセルボタンの文字サイズを指定します。
 * @default 18px
 * 
 * @param cancelButtonColor
 * @text キャンセルボタンの文字色
 * @desc キャンセルボタンの文字色を指定します。
 * @default #FFFFFF
 * 
 * @param cancelButtonBackgroundColor
 * @text キャンセルボタンの背景色
 * @desc キャンセルボタンの背景色を指定します。
 * @default rgba(0, 0, 0, 0.5)
 *
 * @param cancelButtonBorder
 * @text キャンセルボタンのボーダー情報
 * @desc キャンセルボタンのボーダー情報を指定します。
 * @default 1px solid #fff
 *
 * @param cancelButtonBorderRadius
 * @text キャンセルボタンのボーダー半径
 * @desc キャンセルボタンのボーダー半径を指定します。
 * @default 5px
 *
 * @param cancelButtonPadding
 * @text キャンセルボタンのパディング
 * @desc キャンセルボタンのパディングを指定します。
 * @default 5px 10px
 *
 * @param cancelButtonMarginLeft
 * @text キャンセルボタンの左マージン
 * @desc キャンセルボタンの左マージンを指定します。
 * @default 10px
 *
 * @command openDialog
 * @text テキスト入力を表示
 * @desc テキスト入力ウィンドウを表示します。
 *
 * @arg varId
 * @text 変数ID
 * @desc 入力されたテキストを格納する変数ID
 * @type variable
 * @default
 *
 * @arg defaultText
 * @text メッセージ
 * @desc テキスト入力を促すメッセージを指定します。
 * @default Please enter your text.
 *
 * @arg defaultValue
 * @text デフォルト値
 * @desc 入力欄に表示する初期値を指定します。
 * @default
 *
 * @arg okButtonLavel
 * @text OKボタンの文字
 * @desc OKボタンの文字を指定します。
 * @default OK
 * 
 * @arg cancelButtonLavel
 * @text キャンセルボタンの文字
 * @desc キャンセルボタンの文字を指定します。
 * @default キャンセル
 *
 * @arg maxLength
 * @text 最大文字数
 * @desc 入力可能な最大文字数を指定します。
 * @default 64
 * 
 * @help
 * プラグインコマンドで「InputDialog_Custom」を選び、
 * 変数ID・メッセージ・デフォルト値をそれぞれ設定してください。
 * ゲーム画面内にテキスト入力ウィンドウが表示され、
 * キーボード上で文字入力が可能になります。
 * 
 * 入力確定をキーボードで行う場合はEnterでは無く、Shiftキー+Enterキーです。
 * その旨どこかに表示しておくと便利です。
 * 入力した文字は指定した変数IDに入ります。
 * 空入力、キャンセルの場合は 0 が入ります。
 * 
 * 【 !注意! 】
 * プラグインコマンド直後に別のプラグインやスクリプトを実行する場合、
 * 同時に実行されることがあります。順番通り実行させたい場合は、
 * このプラグインコマンドと次のイベントの間に ウェイトを 数フレーム 挟んでください。
 * 
 */

スポンサードリンク

スポンサードリンク

-MZ用プラグイン

Copyright© #ツクプラMZ , 2026 All Rights Reserved.