MV Help with Press Okay Yanfly Options core Fullscreen [YANFLY OPTIONS CORE]

Hey RM Community. I recently have decided to add a fullscreen option to the option menu and I am currently using yanfly options core and found this test value for an almost perfect full screen option ONLY they didn't include a press okay code with it I been trying to fiddle with it so my code in there is not really working it just keeps opening the game into fullscreen then back out again. (in and out when I press okay, left an right work fine.)

JavaScript:
{"Name":"\\i[1044]Fullscreen","---Settings---":"","HelpDesc":"\"Toggle between fullscreen or windowed mode.\"","Symbol":"fullscreen","ShowHide":"\"show = true;\"","Enable":"\"enabled = true;\"","Ext":"\"ext = 0;\"","---Functions---":"","MakeCommandCode":"\"this.addCommand(name, symbol, enabled, ext);\"","DrawItemCode":"\"var rect = this.itemRectForText(index);\\nvar statusWidth = this.statusWidth();\\nvar titleWidth = rect.width - statusWidth;\\nthis.resetTextColor();\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\nthis.drawOptionsName(index);\\nthis.drawOptionsOnOff(index);\"","ProcessOkCode":"\"var index = this.index();\\nvar symbol = this.commandSymbol(index);\\nvar value = this.getConfigValue(symbol);\\nvar value = $gameSwitches.value(182);\\n\\n$gameSwitches.setValue(182, !value);\\nthis.changeValue(symbol, !value);\\nif (value === true) {\\nGraphics._requestFullScreen();\\n} else {\\nGraphics._cancelFullScreen();\\n};\"","CursorRightCode":"\"var index = this.index();\\nvar symbol = this.commandSymbol(index);\\nvar value = this.getConfigValue(symbol);\\nthis.changeValue(symbol, true);\\nGraphics._requestFullScreen();\"","CursorLeftCode":"\"var index = this.index();\\nvar symbol = this.commandSymbol(index);\\nvar value = this.getConfigValue(symbol);\\nthis.changeValue(symbol, false);\\nGraphics._cancelFullScreen();\"","DefaultConfigCode":"\"ConfigManager[symbol] = false;\"","SaveConfigCode":"\"config[symbol] = ConfigManager[symbol];\"","LoadConfigCode":"\"if (config[symbol] !== undefined) {\\n  ConfigManager[symbol] = !!config[symbol];\\n}\\nif (ConfigManager[symbol]) Graphics._requestFullScreen();\\nelse Graphics._cancelFullScreen();\""}

Copy all that code left to right and paste it and add as a new option to the options core plugin via edit text

So yeah I guess in order for someone to help me they would need to have knowledge of how yanflys options core for RPG Maker MV works.
I dug up an old post of mine with a similar solution:
👋 Oh, not sure why I didn't put anything for the "Process OK" part. This seems to work for me, though~
JavaScript:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changeValue(symbol, !value);
if (value) Graphics._cancelFullScreen();
else Graphics._requestFullScreen();
Little explanation: !value means "not value", i.e. it's false if value is true, and vice versa. 😮‍💨

Here's my plaintext version including the above "Process OK Code":
Code:
{"Name":"\\i[0]Fullscreen","---Settings---":"","HelpDesc":"\"Toggle between fullscreen or windowed mode.\"","Symbol":"fullscreen","ShowHide":"\"show = true;\"","Enable":"\"enabled = true;\"","Ext":"\"ext = 0;\"","---Functions---":"","MakeCommandCode":"\"this.addCommand(name, symbol, enabled, ext);\"","DrawItemCode":"\"var rect = this.itemRectForText(index);\\nvar statusWidth = this.statusWidth();\\nvar titleWidth = rect.width - statusWidth;\\nthis.resetTextColor();\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\nthis.drawOptionsName(index);\\nthis.drawOptionsOnOff(index);\"","ProcessOkCode":"\"var index = this.index();\\nvar symbol = this.commandSymbol(index);\\nvar value = this.getConfigValue(symbol);\\nthis.changeValue(symbol, !value);\\nif (value) Graphics._cancelFullScreen();\\nelse Graphics._requestFullScreen();\"","CursorRightCode":"\"var index = this.index();\\nvar symbol = this.commandSymbol(index);\\nvar value = this.getConfigValue(symbol);\\nthis.changeValue(symbol, true);\\nGraphics._requestFullScreen();\"","CursorLeftCode":"\"var index = this.index();\\nvar symbol = this.commandSymbol(index);\\nvar value = this.getConfigValue(symbol);\\nthis.changeValue(symbol, false);\\nGraphics._cancelFullScreen();\"","DefaultConfigCode":"\"ConfigManager[symbol] = false;\"","SaveConfigCode":"\"config[symbol] = ConfigManager[symbol];\"","LoadConfigCode":"\"if (config[symbol] !== undefined) {\\n  ConfigManager[symbol] = !!config[symbol];\\n}\\nif (ConfigManager[symbol]) Graphics._requestFullScreen();\\nelse Graphics._cancelFullScreen();\""}
😤
Just tested it and it still seems to work for me. 😤
I dug up an old post of mine with a similar solution:

Just tested it and it still seems to work for me. 😤

Unfortunately it does the exact same thing my code did. (in and out of fullscreen loop when pressing ok.)

Thanks for even trying for me though.
You have triacontane's StartUpFullScreen, as an alternative. This puts an option in the options menu to set if the game starts with full screen or not. Also adds a "Shutdown" option in the main menu to exit the game, but that's optional.

And if you want, attached is a modified version by me that, starts the game in fullscreen by default if no configuration file is found (for example first load of the game)
@Dungeonmind - I'm guessing it's a plugin conflict, then, because it worked OK for me in a v1.6.2 project with only YEP_OptionsCore v1.02 active. 😴
I'm guessing it's a plugin conflict, then, because it worked OK for me in a v1.6.2 project with only YEP_OptionsCore v1.02 active.

Nope, I tested in a blank project v1.6.2 and still have that window issue. I am using a Mac but I have never seen plugins do that before.

You have triacontane's StartUpFullScreen, as an alternative. This puts an option in the options menu to set if the game starts with full screen or not. Also adds a "Shutdown" option in the main menu to exit the game, but that's optional.

And if you want, attached is a modified version by me that, starts the game in fullscreen by default if no configuration file is found (for example first load of the game)

Sorry but that doesn't help me at all because I need to keep the Options Core plugin as I use it for many other options in my game that are vital.
And can't you disable the yep fullscreen plugin, while keeping the core plugin and using triacontane's StartUpFullScreen?
@Zero_G - Yanfly's Options Core redefines the layout and behaviour of the options scene: all available commands must be redefined for the new structure (typically through the Options Core plugin parameters). Also, I think triacontane's plugin only affects fullscreen on game boot, rather than allowing it to toggle mid-game? 😅

@Dungeonmind - assuming you haven't edited your project's core scripts, I guess it's because you are using a Mac. Maybe a security feature? I'm curious if you can achieve a persistent fullscreen by any of these methods:
  1. In-game: press F4 (RPG Maker's default fullscreen toggle).

  2. In-game: press F8 to open the console, type Graphics._switchFullScreen(), press Enter (scripted toggle).

  3. Add a "fullscreen": true line to your project's manifest file, package.json, e.g.
    Spoiler: Example package.json + fullscreen edit
    JavaScript:
    {
        "name": "",
        "main": "index.html",
        "js-flags": "--expose-gc",
        "window": {
            "title": "",
            "toolbar": false,
            "width": 816,
            "height": 624,
            "icon": "icon/icon.png",
            "fullscreen": true
        }
    }
    Note that this should cause the game to start in fullscreen and, for me at least, effectively disables the F4 toggle. You can use the Mac equivalent of Alt+F4 (Cmd+W?) to exit.
I get the impression that MacOS is much less back-compatible than Windows; if you haven't already, you might want to experiment with updating your NW.js version as mentioned here:

Original thread: https://forums.rpgmakerweb.com/threads/help-with-press-okay-yanfly-options-core-fullscreen-yanfly-options-core.136855/