edit: btw i also used main menu manager of yanfly
Code:
function Window_Equip_Technique() {
this.initialize.apply(this, arguments);
}
Window_Equip_Technique.prototype = Object.create(Window_Base.prototype);
Window_Equip_Technique.prototype.constructor = Window_Equip_Technique;
Window_Equip_Technique.prototype.initialize = function() {
var width = this.windowWidth();
var height = this.windowHeight();
var x = (Graphics.boxWidth - this.width) / 2;
var y = (Graphics.boxHeight - this.height) / 2;
Window_Base.prototype.initialize.call(this, x, y, width, height);
};
Window_Equip_Technique.prototype.windowWidth = function() {
return 480;
}
Window_Equip_Technique.prototype.windoHeight = function() {
return 240;
}
Window_Equip_Technique.prototype.refresh = function() {
this.contents.clear();
this.drawTextEx("OMG..", 0, 0);
};
Window_Equip_Technique.prototype.open = function() {
this.refresh();
Window_Base.prototype.open.call(this);
};
// Scene
// var _Scene_Menu_createCommandWindow = Scene_Menu.prototype.create;
// Scene_Menu.prototype.createCommandWindow = function() {
// _Scene_Menu_createCommandWindow.call(this);
// this._commandWindow.setHandler('technique', this.commandTechnique.bind(this));
// };
Scene_Menu.prototype.commandTechnique = function() {
SceneManager.push(Scene_Technique);
};
//Scene
function Scene_Technique() {
this.initialize.apply(this, arguments);
}
Scene_Technique.prototype = Object.create(Scene_MenuBase.prototype);
Scene_Technique.prototype.constructor = Scene_Technique;
Scene_Technique.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
Scene_Technique.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
this._techniqueWindow = new Window_Equip_Technique();
this._techniqueWindow.setHandler('cancel', this.popScene.bind(this));
this.addWindow(this._techniqueWindow);
};
Scene_Technique.prototype.start = function() {
Scene_MenuBase.prototype.start.call(this);
};
//Window