본문 바로가기
RPG Maker MV/Input

Keyboard Input Dialog - RPG Maker MV

by biud436 2019. 3. 5.


Introduction 

This plugin is a Text Input System that allows you to enter various languages such as Korean, Chinese, Arabic, Japanese, and Russian. 






Screen shots


▲ v1.1.15, RPG Maker MV v1.6.1






Plugin Commands


Opens Input Dialog.


InputDialog open


Changes the width of Input Dialog.


InputDialog width 488


Changes the text of Input Dialog for representing the description.


InputDialog text Please enter the string...


Changes an id of the variable for saving the value.


InputDialog variableID 3


Displays a alert window of the browser when you are pressing the enter


InputDialog debug true


Specifies the maximum number of character for an input field.


InputDialog maxLength 10


Example


# Open the native web browser (Windows 10)


If you did everything correctly as below, it would run the native browser. 

◆Plugin Command:InputDialog backgroundColor rgba(255, 255, 255, 0.7)

◆Plugin Command:InputDialog variableID 4

◆Plugin Command:InputDialog text Please enter the web site

◆Plugin Command:InputDialog open

◆Text:None, Window, Bottom

:    :You are entered the string called \c[3]\v[4]\c[0]

:    :If you click the button called 'Yes', 

:    :It will execute that url to the native browsers.

:    :Would you execute the website?

◆Show Choices:Yes, No (Window, Right, #1, #2)

:When Yes 

  ◆Script:if(!Utils.isNwjs()) { 

  :      :  console.warn('This platform is not Nwjs');

  :      :  this._index = this._list.length;

  :      :}

  :      :var os = navigator.platform;

  :      :var url = $gameVariables.value(4);

  :      :var child_process = require('child_process');

  :      :if(os.indexOf('Win') >= 0) {

  :      :  child_process.exec('start ' + url);

  :      :} else if(os.indexOf('Mac') >= 0) {

  :      :  child_process.exec('open ' + url);

  :      :}

  ◆

:When No 

  ◆

:End



Interactive Event


You can do some question to a player and then the player can answer their own and you can use comparison operators to compare the result text as follows. In this result text, it may contain the uppercase letters. 


In case of that, This expression may evaluate to false, so it is common that the result text must change as the lowercase letters by calling the toLowerCase() function looks like this. 


=== means equal (note that you need two or three =symbols)


◆Text:None, Window, Bottom

:    :What is the capital of Japan?

◆Plugin Command:InputDialog text What is the capital of Japan?

◆Plugin Command:InputDialog open

◆If:Script:$gameVariables.value(3).toLowerCase() === "tokyo"

  ◆Text:None, Window, Bottom

  :    :It is correct.

  ◆Change Gold:+ 100

  ◆Text:None, Dim, Middle

  :    :100\G were gained.

  ◆

:Else

  ◆

:End





Download


Github RAW


Demo - (7.78MB, RPG Maker MV v1.6.2) 



Change Log

2016.08.09 (v1.0.0) - First Release

2016.08.09 (v1.0.1) - Added Background Color.

2016.08.10 (v1.0.1A) - Added ID Variables.

2016.08.10 (v1.1.0) - Fixed Window_DialogHelp class into the plugin.

2016.08.16 (v1.1.1) - Added the direction property setting the direction of content flow.

2016.08.16 (v1.1.1A) - Fixed a whitespace bug.

2016.10.14 (v1.1.2) - Fixed the issue that is not working in Battle.

2016.10.14 (v1.1.3) :

 - Fixed the bug that does not change the background color.

 - Fixed the bug that does not change the variable ID.

2016.10.17 (v1.1.4) - Fixed the frame works of input dialog in battle.

2016.10.18 (v1.1.5) - Fixed an issue that battler's movement is too fast.

2016.10.29 (v1.1.6) - Added the function that allows you to specify the maximum number of character for an input field.

2016.11.13 (v1.1.61) - Fixed the issue that is directly calling the requestUpdate function of SceneManager (If this function is called multiple times, It will may happen a fast speed problem.)

2016.12.02 (v1.1.65) :

 - Added some style codes such as a text shadow and an outline into the text box.

 - Fixed the way that can temporarily stop attack and skill actions with an enemy when the text box is activated in the battle.

 - It will not process the text input when the text box is not shown in the battle.

 - In the debug mode, It adds the result value to a log window after the text input is done.

2016.12.08 (v1.1.68) - Removed the text hint window.

2016.12.17 (v1.1.69) - Fixed an issue that an integer value could not be checked due to the text type issue.

2017.01.30 (v1.1.7) - Fixed an issue that is not working properly if the text dialog has a string to start with a number.

2017.02.16 (v1.1.8) : 

- Fixed incorrect position and width, height values in the text box.

- Added new feature that indicates the input dialog at the top position of the screen when pressing any key on your own mobile device.

- Added new feature that automatically returns a result of the text box if you did not press anything.

 2018.01.30 (v1.1.9) :

- Added the button called 'OK'.

- Added the button called 'Cancel'.

- Removed the feature that can change the background-color of the input dialog.

2018.02.03 (v1.1.10) :

- Fixed the issue that is not working in RMMV 1.5.1

- Fixed the default value of the plugin parameter  called 'CSS'.

2018.02.06 (v1.1.11) :

- Fixed the issue that is not working in the battle scene.

2018.10.22 (v1.1.15) :

- Added a plugin command that sets the position of the input dialog.

- Added a feature that the keyboard layout is displayed again if you touch the text box from android devices.

- On the mobile device, the font size is now set to 1rem.

- Fixed the default UI-theme is to black.

- In the chromium 69+ more over, The input element is always displayed even though <canvas>'s z-index is large than <input> element's z-index. so I've fixed it (I've applied the property named display: none;)

2019.03.05 (v1.1.16) :

- Fixed the issue that can not create a background when using Irina_PerformanceUpgrade.