Keyboard Input Dialog

possible to not pause events movements, timer, while the dialogue window is open ?
Hi Biud, Center is not working, in PC is centered, but in mobile its not
Need some help with the input box, im trying to run it in android,, but the box sticks to the bottom right corner ,ive tried center,, and x ,z cords but it stays on the bottom right of my game window, any help would be appreciated,
ps it works fine on browser and desktop
Need some help with the input box, im trying to run it in android,, but the box sticks to the bottom right corner ,ive tried center,, and x ,z cords but it stays on the bottom right of my game window, any help would be appreciated,
ps it works fine on browser and desktop
That's position can be the different depends on device resolution. But I'm not sure how to reproduce it that you said.
That's position can be the different depends on device resolution. But I'm not sure how to reproduce it that you said.

its not the device resolution, i tried it on other devices, its exactly the same... the input box sticks to the bottom right. Thanks though
its not the device resolution, i tried it on other devices, its exactly the same... the input box sticks to the bottom right. Thanks though
The input element is placed on the center of the screen. however some elements such as canvas, video, input are resized to force by chrome whenever opening a virtual keyboard on Android Chrome. So I can't solve it right now. It seems that many experiments will be needed to prevent screen shrinkage.

If you change css elements the following on developer tools, it will be located as you wish on the center of the screen. However it's not exactly changed via the code inside plugin. I'm not sure why that is not changed.

hia77Y3.png
Hi, and thanks a lot @biud436 !
I was looking for an easy-to-use keyboard input plugin, and yours works great, thank you !
Hi everybody,

first of all many, many thanks to @biud436 as this is the main plugin of my actual project. It is working flawlessly. The only thing is that I want to made some change in its appearance through CSS, but I can't do that. I just want to make the font size bigger, as I have changed the game resolution to 1024x768.
This is what I added in the "CSS parameter" section of the plugin:

.inputDialogContainer {
font-size: 40px;
}

Attached here you have also an image of the whole plugin settings.
All my attempts were vane, I had no results.
Please consider also that I know very little about CSS.

PS: I hope this is the right section to ask for...
Hi everybody,

first of all many, many thanks to @biud436 as this is the main plugin of my actual project. It is working flawlessly. The only thing is that I want to made some change in its appearance through CSS, but I can't do that. I just want to make the font size bigger, as I have changed the game resolution to 1024x768.
This is what I added in the "CSS parameter" section of the plugin:

.inputDialogContainer {
font-size: 40px;
}

Attached here you have also an image of the whole plugin settings.
All my attempts were vane, I had no results.
Please consider also that I know very little about CSS.

PS: I hope this is the right section to ask for...

You can't change font size using css in the plugin.

To change the font size,
You need to delete any of the code dealing with that changes the font size, from the plugin file.

JavaScript:
    Line 454:       textBox.style.fontSize = (Utils.isMobileDevice()) ? '1rem':(2 * Graphics._realScale) + "em";
    Line 459:     if(OkButton) OkButton.style.fontSize = (Utils.isMobileDevice()) ? '1rem':(1 * Graphics._realScale) + "em";
    Line 460:     if(CancelButton) CancelButton.style.fontSize = (Utils.isMobileDevice()) ? '1rem':(1 * Graphics._realScale) + "em";
    Line 723:     if(OkButton) OkButton.style.fontSize = (Utils.isMobileDevice()) ? '1rem':(1 * Graphics._realScale) + "em";
    Line 724:     if(CancelButton) CancelButton.style.fontSize = (Utils.isMobileDevice()) ? '1rem':(1 * Graphics._realScale) + "em";
    Line 726:     textBox.style.fontSize = (Utils.isMobileDevice()) ? '1rem':(2 * Graphics._realScale) + "em";

You can change the font size via css, after that.
Great! I already started experimenting, it works!

Just to know: given that I only want to double the text box size (leaving unmodified the OK and Cancel buttons), could it be possible just to change the REM value from 1 to 2 in lines 454 and 726? It seems a simplier way to get what I want.

Thanks in advice!
Hello guys,

I wanna say my thanks to @biud436 for this awesome plugin, working perfectly for what I needed. However, I wanna ask if there is any way to force cancel the text input (for example after a timer end) using script and plugin commands?

Thanks in advance!
Hello guys,

I wanna say my thanks to @biud436 for this awesome plugin, working perfectly for what I needed. However, I wanna ask if there is any way to force cancel the text input (for example after a timer end) using script and plugin commands?

There is no solution in this plugin.
You can set desired text using javascript code block directly, as follows.

JavaScript:
(function () {
    "use strict";
    const query = `div#${RS.InputDialog.Params.szFieldId} table.inputDialogContainer tr td input[type=text]`;
    let textBox = document.querySelector(query);
    textBox.value = "DESIRED_TEXT";
})();

or you can use TextBox.prototype.setText(text) method, too.
There is no solution in this plugin.
You can set desired text using javascript code block directly, as follows.

JavaScript:
(function () {
    "use strict";
    const query = `div#${RS.InputDialog.Params.szFieldId} table.inputDialogContainer tr td input[type=text]`;
    let textBox = document.querySelector(query);
    textBox.value = "DESIRED_TEXT";
})();

or you can use TextBox.prototype.setText(text) method, too.

I see. Thanks for the reply, @biud436, awesome plugin. I will try to find a way to work around with this.
Perfect for a password system
Thanks for this awesome plugin which has served many people well!

I do have some issues under android though. If I click in the centered text box, neither a cursor nor the android keyboard appears. I can only trigger the keyboard by clicking in the lower left corner of the screen. Anyone an ideas what might causes this? Any hint would be appreciated!
Thanks for this awesome plugin which has served many people well!

I do have some issues under android though. If I click in the centered text box, neither a cursor nor the android keyboard appears. I can only trigger the keyboard by clicking in the lower left corner of the screen. Anyone an ideas what might causes this? Any hint would be appreciated!
it is probably the bug related of size of <div> element.

I'm a web backend developer with a year of experience. However, In case of RPG Maker MV, this is not a typical web page. So sometimes there are difficult problems to solve.

In fact, HTMLInputElement is most commonly used even on the website of mobile device and it is worked fine. But I placed it above the HTMLCanvasElement that redraws whenever rendering the game frame using HTMLInputElement.prototype.style property. But this solution is pretty not good.
Sorry, I can't say that I understood your point.

Did it work on other android devices? The changelog indicates it did. I also vaguely remember that I tested your plugin a while ago on android ... and it did work.
Sorry, I can't say that I understood your point.

Did it work on other android devices? The changelog indicates it did. I also vaguely remember that I tested your plugin a while ago on android ... and it did work.

I didn't change anything. the plugin's latest commit was 1 year ago. But, the Android System Webview is updated every month. so it can be occurred some bug frequently. Realistically, I can't feedback on this every month. Could you tell me the screen size of your mobile device? I'll test it out soon.
Thank you very much for checking it!

The game runs at 672 x 379 px (on a smatphone display that is 2340 x 1080 px).
Thanks for this awesome plugin which has served many people well!

I do have some issues under android though. If I click in the centered text box, neither a cursor nor the android keyboard appears. I can only trigger the keyboard by clicking in the lower left corner of the screen. Anyone an ideas what might causes this? Any hint would be appreciated!

Hi @SVEzT, @biud436 and everybody, hope you all are doing well.
I finished my game (in which this plugin is fundamental), it runs with no problem in Windows, but now that I'm working on the Android version I had the same "no keyboard/cursor appearing" problem.
Did you find any solution to this?
If no, and also to avoid future problems with Android Web Studio updates as @biud436 was talking about, I was considering using @Aloe Guvner's Virtual Buttons and DPad plugin to make keyboard appears anyway and whenever it is needed, but before trying this I wanted to know if you found or there are other ways/solution to fix the problem.
Many thanks in advice, have a good day you all.

Original thread: https://forums.rpgmakerweb.com/threads/keyboard-input-dialog.66908/