Bind all windows x,y,width and height to variables that users can easily edit

I thought about this a bit.

The MV code base is huge and mapping the x,y,width, height would be a pain and lead to a lot of edits as a community script.

So, instead from a programming perspective I have a solution.

Every Scene and Window has a name in MV.

We can give users a list of Windows & Scene Names. Then place a single function in Window_Base that will overwrite the Window properties on initialization and refresh the contents based on what names are in the list.

If a Scene name is provided only the scene is effected with the window changes.

If a Window name is provided, the changes are global.

This makes changing the properties optional using the struct type now available in the PluginManager list. Devs just have to make sure their new Window class is available in the global context.

Meaning as a dev and as a creator life is a lot easier; add changes you want, leave the ones you don't want to edit off the list.
Yeah, that's pretty much how the STE's Menu Editor saves everything.

For example:
Spoiler: JSON
Code:
{
    "Scene_Title": {
        "Window_TitleCommand": {
            "x": "100",
            "y": "500"
        }
    },
    "Scene_Item": {
        "Window_ItemCategory": {
            "width": "1000"
        },
        "Window_Help": {
            "x": "0",
            "y": "100",
            "width": "Graphics.boxWidth",
            "height": "win.fittingHeight(2)"
        }
    }
}

And then everything can be simply read doing something like:
Spoiler: JavaScript
Code:
//$dataWindows contains JSON info

var _SceneManager_onSceneStart = SceneManager.onSceneStart;
SceneManager.onSceneStart = function() {
    _SceneManager_onSceneStart.apply(this, arguments);
    this._scene.setupWindowProperties();
};

Scene_Base.prototype.setupWindowProperties = function() {
    //Check if window layer exists and if there is any saved data for this scene.
    if(!this._windowLayer || !$dataWindows[this.constructor.name]) return;
    var children = this._windowLayer.children;
    var sceneInfo = $dataWindows[this.constructor.name];
    children.forEach(function(win) {
        //Check and make sure window exists and if there's any data saved for it.
        if(win && win.constructor && sceneInfo[win.constructor.name]) {
            //Apply data, but only if it exists.
            var info = sceneInfo[win.constructor.name];
            if(info.x) win.x = eval(info.x);
            if(info.y) win.y = eval(info.y);
            if(info.width) win.width = eval(info.width);
            if(info.height) win.height = eval(info.height);
        }
    });
}

Therefore, when someone's creating their own custom scene, they could simply do this to set up position/size of windows:
Spoiler: JavaScript
Code:
$dataWindows["Scene_Custom"] = {};
$dataWindows["Scene_Custom"]["Window_Custom1"] = {
  x: "200",
  y: "400"
}

Don't know if this code helps, but please feel free to use it if it'll help make this feature happen. ¯\_(ツ)_/¯
We have the same idea then and yea, I had a similar thought.

I think I'll do children looping also. Right now I'm injecting params into Windows directly. But instead going through SceneManager._scene to check but using SceneBase will be cleaner.

Original thread: https://forums.rpgmakerweb.com/threads/bind-all-windows-x-y-width-and-height-to-variables-that-users-can-easily-edit.80757/