Double Tapping (Selecting and Deciding)

I am manually using TouchInput for a custom image, where if I click that custom image, it would select that image with a certain command. Here's how I did it:

if(TouchInput.isTriggered() && TouchInput._x > Graphics.width / 2 - 100 && TouchInput._x < Graphics.width / 2 + 100 && TouchInput._y > 440 && TouchInput._y < 480) { SoundManager.playCursor(); this._commandWindow._index = 0; }However, when say I do this:

if(TouchInput.isTriggered() && TouchInput._x > Graphics.width / 2 - 100 && TouchInput._x < Graphics.width / 2 + 100 && TouchInput._y > 440 && TouchInput._y < 480) { SoundManager.playCursor(); this._commandWindow._index = 0; DataManager.setupNewGame(); this._commandWindow.close(); this.fadeOutAll(); SceneManager.goto(Scene_Map); }we all know that when you click the image, it directly puts you on the new game and transfer you on map. Note that I hid the title command and placed them somewhere else, and an image represents them. However, in a normal command, we select the command first, click it again before it gets selected. I want to do that here.

How do you exactly click the image, set the command, and wait till you click it again before it executes the other methods?
there is no need to touch TouchInput. instead, create a button from the Sprite_Button class and add it the window. then set its callback:

Code:
button.setClickHandler(this.someFunction.bind(this, i));
look into Window_ShopNumber to see how they do it.

Original thread: https://forums.rpgmakerweb.com/threads/double-tapping-selecting-and-deciding.49967/