Showing Window_NumberInput in a custom scene

Hi all,

I need to use Window_NumberInput in a custom scene I'm making, but I cannot get it to show up for love or money. I've stripped out everything else from the scene in hopes of isolating the problem:

 

function Scene_Test(){ this.initialize.apply(this, arguments);}Scene_Test.prototype = Object.create(Scene_MenuBase.prototype);Scene_Test.prototype.constructor = Scene_Test;Scene_Test.prototype.initialize = function() { Scene_MenuBase.prototype.initialize.call(this);};Scene_Test.prototype.create = function() { Scene_MenuBase.prototype.create.call(this); this.createWindowLayer();// this.createHelpWindow(); this.createNumberWindow();};Scene_Test.prototype.createNumberWindow = function() { console.log("running"); this._numberWindow = new Window_NumberInput();// this._numberWindow.hide(); this.addWindow(this._numberWindow); this._numberWindow.show(); this._numberWindow.activate();};I'm using multiple other windows in the full version of the scene, and they all operate with no problem, but I can't get any response whatsoever from Window_NumberInput. The console.log shows me that the code is being read, but only the help window is ever displayed. You can see in createNumberWindow where I've tried several activation commands to no avail. What am I missing?
Hmmm, if I wanted to use the number input here is the code  I would use. I am being lazy on this code.

Where $gameMessage.setNumberInput(variable,maxDigits) is the money maker.

Code:
var COLD = COLD || {};(function(){	COLD.TEST = {		Test_Scene	: function(){this.initialize.apply(this, arguments);},	};})();(function($){	($.prototype = Object.create(Scene_MenuBase.prototype)).constructor = $;	$.prototype.initialize = function() {		Scene_MenuBase.prototype.initialize.call(this);	};		$.prototype.create = function() {		Scene_MenuBase.prototype.create.call(this);		this.createDisplayObjects();	};	$.prototype.createDisplayObjects = function() {		this.createWindowLayer();		this.createAllWindows();	};	$.prototype.createAllWindows = function() {		this.createMessageWindow();	};	$.prototype.createMessageWindow = function() {		this._messageWindow = new Window_Message();		this.addWindow(this._messageWindow);		this._messageWindow.subWindows().forEach(function(window) {			this.addWindow(window);		}, this);		$gameMessage.setNumberInput(1,10)	};		})(COLD.TEST.Test_Scene);
Oh, so it has to be called as a subWindow! Great, this gets me halfway there. With this code, the game basically freezes after the player inputs a number, because we're stuck in the scene with no further instructions. To get around this, I'm aliasing Window_NumberInput.prototype.processOk to reactivate the command window (this is in the full script):
 

var RM_Window_NumberInput_processOk = Window_NumberInput.prototype.processOk;Window_NumberInput.prototype.processOk = function() { RM_Window_NumberInput_processOk.call(this); if (Scene_SkillCreation._commandWindow) { Scene_SkillCreation._commandWindow.activate(); } else{ SceneManager.pop(); }};but I can't get it to recognize Scene_SkillCreation._commandWindow. I also tried if(SceneManager._scene === Scene_SkillCreation), but no dice. Do you have any ideas how I could do this?
I might be lazy but this is how I would do that issue.

What it does it when you start the number input it sets the current window that you want to be activated after you finished to need an update.

Once you are no longer inputting a number it then activates that window and tells the game that it no longer needs an update.

Spoiler
]var COLD = COLD || {};(function(){ COLD.TEST = { Test_Scene : function(){this.initialize.apply(this, arguments);}, Test_Main_Window :function(){this.initialize.apply(this, arguments);}, };})();(function($){ ($.prototype = Object.create(Window_Base.prototype)).constructor = $; $.prototype.initialize = function(x,y) { var width = 300; var height = 300; Window_Base.prototype.initialize.call(this,x,y,width,height); }; })(COLD.TEST.Test_Main_Window);(function($){ ($.prototype = Object.create(Scene_MenuBase.prototype)).constructor = $; $.prototype.initialize = function() { Scene_MenuBase.prototype.initialize.call(this); }; $.prototype.create = function() { Scene_MenuBase.prototype.create.call(this); this.createDisplayObjects(); }; $.prototype.update = function() { Scene_MenuBase.prototype.update.call(this); if(this._mainWindow.needsUpdate == true && !this.isBusy()){ this._mainWindow.activate(); this._mainWindow.needsUpdate = false; }; }; $.prototype.createDisplayObjects = function() { this.createWindowLayer(); this.createAllWindows(); }; $.prototype.createAllWindows = function(){ this.createMessageWindow(); this.createMainWindow(); }; $.prototype.createMessageWindow = function() { this._messageWindow = new Window_Message(); this.addWindow(this._messageWindow); this._messageWindow.subWindows().forEach(function(window) { this.addWindow(window); }, this); }; $.prototype.createMainWindow = function(){ this._mainWindow = new COLD.TEST.Test_Main_Window(0,0); this.addWindow(this._mainWindow); this.startNumberInput(this._mainWindow); }; $.prototype.startNumberInput = function(window){ $gameMessage.setNumberInput(1,10) window.needsUpdate = true; }; $.prototype.isBusy = function(){ return $gameMessage.isBusy(); }; })(COLD.TEST.Test_Scene);
I could be wrong on the best way to do this. I know of one other way but I haven't tested it yet and don't see a need to.
isBusy did the trick, thanks! I didn't even know that was a function.

Original thread: https://forums.rpgmakerweb.com/threads/showing-window_numberinput-in-a-custom-scene.53487/