Moghunter Menu - looping to the left - RMMV

Hello! I'm using Moghunter's Monogatari menu plugin, and would like to add the ability to simply press "left" to have the menu cursor selection go to the final selection on the right, rather than having to hit "Right" 9 times to get to Quit.

Menu.png

Here's the plugin: https://atelierrgss.wordpress.com/rmv-monogatari/

I can't seem to figure out where in the code the author disabled this option... as it works by default in RMMV. Can anyone help?

Thanks very much!

-Fer
I know where to look, but I dont see 9, or 8, but you can look to the cursor saying
if index <= 0, than index = 8 instead of 0
same with the other thing, but I can look tomorrow into it for you, but hopefully someone can help you
on it before me.

But its somewhere between those lines 🙂
It's because Mog calls the cursorUp & cursorDown methods without a wrap argument, meaning they'll never wrap. The default code only wraps if you have just pressed the directional key. 😅

Try saving this one of these a .js file and importing as a plugin:
Spoiler: Option 1 (always wrap)
Code:
Window_MenuCommand.prototype.processCursorMove = function() {
    if (this.isCursorMovable()) {
        var lastIndex = this.index();
        if (Input.isRepeated('down') || Input.isRepeated('right')) {
            this.cursorDown(true);   // <-- edit 1 of 2
        };
        if (Input.isRepeated('up') || Input.isRepeated('left')) {
            this.cursorUp(true);   // <-- edit 2 of 2
        };
        if (this.index() !== lastIndex) {
            SoundManager.playCursor();
        };
    };
};
Spoiler: Option 2 (wrap like default)
Code:
Window_MenuCommand.prototype.processCursorMove = function() {
    if (this.isCursorMovable()) {
        var lastIndex = this.index();
        if (Input.isRepeated('down') || Input.isRepeated('right')) {
            this.cursorDown(Input.isTriggered('down') || Input.isTriggered('right'));   // <-- edit 1 of 2
        };
        if (Input.isRepeated('up') || Input.isRepeated('left')) {
            this.cursorUp(Input.isTriggered('up') || Input.isTriggered('left'));   // <-- edit 2 of 2
        };
        if (this.index() !== lastIndex) {
            SoundManager.playCursor();
        };
    };
};
Alternatively, you can simply find the relevant lines in MOG_SceneMenu.js and edit them directly~ 🙏
@caethyril Editing the lines within MOG_SceneMenu.js worked wonderfully- Thanks!
OK, just remember that if you happen to update the plugin at some point then you'll need to reapply that edit. 🙂

Happy RPG Making! 😂

Original thread: https://forums.rpgmakerweb.com/threads/moghunter-menu-looping-to-the-left-rmmv.115041/