Well, my code is the one that follows:
(function() {
function Window_MyWindow2() {
this.initialize.apply(this, arguments);
}
Window_MyWindow2.prototype = Object.create(Window_Selectable.prototype);
Window_MyWindow2.prototype.constructor = Window_MyWindow2;
Window_MyWindow2.prototype.initialize = function(x,y,height,width) {
Window_Selectable.prototype.initialize.call(this,x,y,height,width);
this.refrescar();
};
Window_MyWindow2.prototype.refrescar = function() {
this.drawTextEx('' + $gameSelfSwitches.value([4,1,'A']), 0,125 );
}
var _Scene_Map_createAllWindows2 = Scene_Map.prototype.createAllWindows;
Scene_Map.prototype.createAllWindows = function() {
_Scene_Map_createAllWindows2.call(this);
this.crearMiniMapa2();
};
Scene_Map.prototype.crearMiniMapa2 = function() {
this._minimapWindow2 = new Window_MyWindow2(120,130,300,270);
this.addChild(this._minimapWindow2);
this.update();
};
})();
Don't know if I need to add something to refresh the variables appropiately. I did the sprite things and it works, so the code works in the game but it does not refresh in the window yet until I leave. ¿Any clue? (and thanks for the page things, I know I will be using that later a lot). If this works, and you give me the solution, I can tinker for what I need next anyway. This is not the only variable written as $gameSOMETHING for which this happens to me, so fixing this refresh issue might help me with all my other issues in this regard.