[SOLVED]Request right click support for Message Window Hide by Jatopian

Currently it doesn't support hiding/unhiding the message window by right click, so I am requesting this feature.
Plugin can be found here.
https://forums.rpgmakerweb.com/index.php?threads/message-window-hide.71337/

Also to anyone who would be willing to do it, would you consider making it compatible with Magnus0808's
MRP_ScrollOnMessage.js which allows you to advance the message box using the mouse wheel. (his plugin is compatible with Yanfly's message backlog plugin btw.)

Let's say if the message box is hidden, it will be impossible to advance the message without first making it appear again using unhide button/right click again/ or a mouse wheel down with MRP_scrollonmessagel.js active

https://forums.rpgmakerweb.com/inde...-the-message-window-using-mouse-wheel.105662/

This is all for making reading on RPGMaker MV as if it was in a Visual Novel.
Did you take into account that right-click is to open/close the menu?
Yes, but I was hoping there was a way that the script will work only if there's an active show text window being shown.
Can I bump it?
EDIT: I have placed this reply in a spoiler as it was NOT a solution to the request. However, it was the result of me doing a request at 9am after playing games all night. Apparently I lose the ability to read request properly.

Spoiler: OLD REPLY
I didn't notice you had mentioned me before now. Here you go. Put it after MRP_ScrollOnMessage or you will be able to advance the text while it is hidden with both scroll and right click.

Code:
//=============================================================================
// Advance Text On Right Click
// MRP_AdvanceTextOnRightClick.js
// By Magnus0808 || Magnus Rubin Peterson
//=============================================================================

/*:
 * @plugindesc Advance text on right click
 * @author Magnus0808
 *
 * @help Plug and play.
 * Put this after MRP_ScrollOnMessage if you have that one.
*/


(function(){
    var MRP_ADVANCERIGHTCLICK_WM_UPDATE_OLD = Window_Message.prototype.update;
    Window_Message.prototype.update = function() {
        MRP_ADVANCERIGHTCLICK_WM_UPDATE_OLD.call(this);
        this.processRightClick();
    };
   
    Window_Message.prototype.isOpenAndActive = function() {
        return this.isOpen() && this.active && this.visible;
    };
   
    Window_Message.prototype.processRightClick = function() {
        if(this.isOpenAndActive() && TouchInput.isCancelled()){
            if(!this.isAnySubWindowActive()){
                this._showFast = true;
                Input.update();
                this.pause = false;
                if (!this._textState) {
                    this.terminateMessage();
                }
            }
        }
    };
   

})();
I didn't notice you had mentioned me before now. Here you go. Put it after MRP_ScrollOnMessage or you will be able to advance the text while it is hidden with both scroll and right click.

Hello Mag and thanks again for responding to my request. I tried the MRP_AdvanceTextOnRightClick.js plugin and what it seems to do is advance the text message window this time by right clicking just like what your other plugin MRP_ScrollOnMessage.js does but that time with a mouse wheel down.

However, what I really wanted was just to be able to hide an active show text window using the right click button. Jatopian's plugin "Message Window Hide" can already do this but it lacks the option to allow you to select the right mouse button as the trigger. (it only allows alphanumeric keys on the keyboard.)

But I am lazy and I want it to be right click instead, ☺️
And also because I've gotten used to reading a lot visual novels where the right click button is always the "hide message box" button. So I wished I could implement this feature to our MV game project as well.

Edit: So I am thinking probably an add-on extension to Jatopian's plugin is needed?
Edit: As for the current behavior of your plugin MRP_ScrollOnMessage.js with Jatopian's MessageHide.js(modified using mdqp's code fix), they are quite fine with each other. When the message box becomes hidden by pressing a keyboard button (let's say C) then you decide to scroll down with the mouse wheel, it makes the message box appear again only this time advancing the text by one line. Some people would prefer instead of advancing by one line, make it reappear with the current text instead, but I do not mind.
Hey again, sorry about that. This should be a lesson in why you should not do request at 9am when you have been up all night playing games. Here is what you actually asked for:
Code:
//=============================================================================
// Message Hide On Right Click
// MRP_MessageHideOnRightClick.js
// By Magnus0808 || Magnus Rubin Peterson
//=============================================================================

var Imported = Imported || {};

/*:
 * @plugindesc MessageHide Extension. Hide message on right click.
 * @author Magnus0808
 *
 * @help Plug and play. Put after MessageHide.
*/

(function(){
    var MRP_HIDERIGHTCLICK_WM_UPDATE_OLD = Window_Message.prototype.update;
    Window_Message.prototype.update = function() {
        MRP_HIDERIGHTCLICK_WM_UPDATE_OLD.call(this);
        this.processRightClick();
    };
   
    Window_Message.prototype.isOpenAndActive = function() {
        return this.isOpen() && this.active;
    };
   
    var MRP_HIDERIGHTCLICK_WM_UPDATEINPUT_OLD = Window_Message.prototype.updateInput;
    Window_Message.prototype.updateInput = function() {
        if(this.pause && this.isTriggered() && !this.visible) {
            return true;
        }
        return MRP_HIDERIGHTCLICK_WM_UPDATEINPUT_OLD.call(this);
    };
   
    Window_Message.prototype.processRightClick = function() {
        if(this.isOpenAndActive() && TouchInput.isCancelled()){
            MessageHide_messageWindowVisible = !MessageHide_messageWindowVisible;
        }
    };
   
    if(Imported.YEP_MessageCore){
        var MRP_HIDERIGHTCLICK_WNB_UPDATE = Window_NameBox.prototype.update;
        Window_NameBox.prototype.update = function() {
            MRP_HIDERIGHTCLICK_WNB_UPDATE.call(this);  
            if(this._parentWindow.isOpen())
            {
                this.visible = this._parentWindow.visible;          
            }
        }
    }
})();
Hey thanks again for getting back to me.
Yup it definitely works, unfortunately it's suffering from the same initial problem as Jatopian's plugin had with Yanfly's Message Core.
That particular Yanfly's pugin I use is a core plugin which adds quite a bit of functionality to the default MV message system, like creating a separate Name Box Window each time a text code like this; \n<NameofNPC> is inserted on a show text command. Right now MRP_MessageHideOnRightClick.js is missing a feature that will include that Name Box window to be hidden together with the main message window.

A user by the name of mdqp from that thread discovered it and made a fix by inserting this additional code the plugin. Which is why I mentioned earlier about Jatopian's MessageHide.js(modified using mdqp's code fix).

Perhaps that might help?

And also thanks for the update on MRP_ScrollOnMessage.js. What I meant by scroll makes the message box appear again is that whenever the message window is hidden by Jatopian's MessageHide.js (by keyboard press) your plugin can make it reappear again (previously by advancing the textbox by one line) by scrolling down the mouse wheel. Now that you have updated it, it now makes it so that it doesn't advance the text anymore, instead it just makes the previously hidden message box reappear again without advancing the text by one line. This isn't a bug really, it's more of preference between people.

Edit: If it helps, I'm about to make a video now to demonstrate the first paragraph.
Edit: Here it is, along with a screenshot of the event using the message box text code.
Spoiler

As you can see, it leaves out the window created by \n<Shizuru>
Oh and btw I used right click in the video to hide the message window.

Spoiler
IN4Na4e.png
I have fixed it now. With this you shouldn't need mdqp's code fix either. This is a better fix as well as it sets the visibility of the Window_NameBox to be the same as the one for the Window_Message when it is open.

I have edited my reply with the plugin 🙂
It is working perfectly now.
With this and your other plugins together with Qtouch plugin by Quxios it is possible to almost never use your keyboard during gameplay (at least for my game.) and have a very similar stress-free reading experience in RPGMaker MV as if it was in a Visual Novel engine.

MessageHide.js
MRP_ScrollOnMessage.js
MRP_MessageHideOnRightClick.js
QPlus.js
QTouch.js

Many thanks again!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-request-right-click-support-for-message-window-hide-by-jatopian.106282/