So, I've been trying to follow a tutorial from Soulpour777's YouTube Channel that demonstrates how to create a custom window upon activating an event. I've been rewatching and checking against the video and the comments section but for the life of me I can't seem to get it to function. I'm probably missing something obvious but my eyes hurt from reading the file over and over the last hour and a half. If anyone can take a peek and help me with this infuriating problem it would be HIGHLY appreciated.
Also, the error I'm receiving during gameplay is something about a TypeError undefined.
function Window_ETMenu() {
this.initialize.apply(this, arguments);
}
Window_ETMenu.prototype = Object.create(Window_Base.prototype);
Window_ETMenu.prototype.constructor = Window_ETMenu;
Window_ETMenu.prototype.initialize = function(x, y) {
var width = this.windowWidth();
var height = this.windowHeight();
Window_Base.prototype.initialize.call(this, x, y, width, height);
this.refresh();
};
Window_ETMenu.prototype.windowWidth = function() {
return 250;
};
Window_ETMenu.prototype.windowHeight = function() {
return 250;
};
Window_ETMenu.prototype.refresh = function() {
var x = this.textPadding();
var width = this.contents.width - this.textPadding() * 2;
this.contents.clear();
};
Window_ETMenu.prototype.open = function() {
this.refresh();
Window_Base.prototype.open.call(this);
};
function ETMenuScene() {
this.initialize.apply(this, arguments);
}
ETMenuScene.prototype = Object.create(Scene_MenuBase.prototype);
ETMenuScene.prototype.constructor = ETMenuScene;
ETMenuScene.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
ETMenuScene.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
this.creatETMenu();
};
ETMenuScene.prototype.createETMenu = function() {
this._ETMainWindow = new Window_ETMenu(0,0);
this._ETMainWindow.x = 0;
this._ETMainWindow.y = 0;
this.addWindow(this._ETMainWindow);
}
ETMenuScene.prototype.update = function() {
Scene_MenuBase.prototype.update.call(this);
if (Input.isTriggered('cancel')) {
SceneManager.goto(SceneManager._previousClass);
}
}
ETMenuScene.prototype.start = function() {
Scene_MenuBase.prototype.start.call(this);
this._ETMainWindow.refresh();
};
Thanks again to anyone that would offer some advice!
MenaKatep
Also, the error I'm receiving during gameplay is something about a TypeError undefined.
function Window_ETMenu() {
this.initialize.apply(this, arguments);
}
Window_ETMenu.prototype = Object.create(Window_Base.prototype);
Window_ETMenu.prototype.constructor = Window_ETMenu;
Window_ETMenu.prototype.initialize = function(x, y) {
var width = this.windowWidth();
var height = this.windowHeight();
Window_Base.prototype.initialize.call(this, x, y, width, height);
this.refresh();
};
Window_ETMenu.prototype.windowWidth = function() {
return 250;
};
Window_ETMenu.prototype.windowHeight = function() {
return 250;
};
Window_ETMenu.prototype.refresh = function() {
var x = this.textPadding();
var width = this.contents.width - this.textPadding() * 2;
this.contents.clear();
};
Window_ETMenu.prototype.open = function() {
this.refresh();
Window_Base.prototype.open.call(this);
};
function ETMenuScene() {
this.initialize.apply(this, arguments);
}
ETMenuScene.prototype = Object.create(Scene_MenuBase.prototype);
ETMenuScene.prototype.constructor = ETMenuScene;
ETMenuScene.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
ETMenuScene.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
this.creatETMenu();
};
ETMenuScene.prototype.createETMenu = function() {
this._ETMainWindow = new Window_ETMenu(0,0);
this._ETMainWindow.x = 0;
this._ETMainWindow.y = 0;
this.addWindow(this._ETMainWindow);
}
ETMenuScene.prototype.update = function() {
Scene_MenuBase.prototype.update.call(this);
if (Input.isTriggered('cancel')) {
SceneManager.goto(SceneManager._previousClass);
}
}
ETMenuScene.prototype.start = function() {
Scene_MenuBase.prototype.start.call(this);
this._ETMainWindow.refresh();
};
Thanks again to anyone that would offer some advice!
MenaKatep