You want to hide the window entirely? If so, just search for this line:
super(x, y, Graphics.width, fitting_height(6))
And right below that line, add this:
self.opacity = 0
This hides the whole window background while still displaying everything inside the window.
Mn, can I turn the window visibility on and off in a script call? EDIT: Now I am getting some undefined method opacity error. 😳
There is always room for improvement.
I will consider adding some options to modify opacity. I'm quite busy today, so this may take some days, I hope you will understand.
PS: Thanks Sixth for your support!
I found your topic again while searching for Neon Black's Keyboard Input script (oddly enough, this topic is the first google links for me 😳).
Just out of curiosity, I checked your code, and found some memory leaks.
This method:
def window
Window_Base.new(0,0,0,0)
end
Will always create a new window when called. The old ones will never get disposed, and this leads to a memory leak.
You call the method twice when making a new Scene_Text_Config object, so every single time that happens, 2 new windows will be created.
Open the text input scene a few times, and you will get tons of undisposed windows, and they will eat the memory completely after some time.
You should store that window in an instance variable, so that you can access it later and dispose it properly.
The window must be disposed when leaving the Scene_Text scene (you can do that in the on_input_ok method easily), or any reference to it is lost (because you will initialize a new Scene_Text_Config object every time you open the Scene_Text scene and that new one will overwrite the old, stored one), which will, again, lead to memory leaks.
Hello,
thanks for spotting this issue. I updated the code and put appropriate links and credits in the original post. Now windows should be disposed properly.
Thank you!
Hello,
Nice script. Thank you very much for making it available!
I'm glad you found it useful! 🙂
Is there any way to have it call the script to make a certain event play out depending on what you type in.
For example, if you were to type "x"and have it set to a variable. Then a later event would call on that variable to perform a certain action.
Alright thank you. However I seem to be having another issue. The keyboard soft locks the game if you attempt to use it during a battle. Is there any way to fix this?