Hi people!
Needing a help with the code here.
I'm trying to put a help window in my menus.
For the time being, I was able to configure all the menus I wanted. Skill, Equip, Status, etc ...
However I am having difficulties with the options menu.
Here's the code I'm doing:
On all other menus, this method
"this._helpWindow.setText (optionsHelp [this._commandWindow._index])" worked.
But in this case, whenever I try to open the options menu the error appears:
"TypeError
Can not read property "_index" of undefined "
When I remove this index, I can get into the options menu and see the help window. But nothing appears in it.
Thanks in advance!
Needing a help with the code here.
I'm trying to put a help window in my menus.
For the time being, I was able to configure all the menus I wanted. Skill, Equip, Status, etc ...
However I am having difficulties with the options menu.
Here's the code I'm doing:
Code:
(function(){
var optionsHelp = ['abc', 'asd', 'blabla'];
var eliSceneOptions_create = Scene_Options.prototype.create;
Scene_Options.prototype.create = function() {
eliSceneOptions_create.call(this);
this.createHelpWindow();
};
Scene_Options.prototype.update = function() {
Scene_MenuBase.prototype.update.call(this);
this._helpWindow.setText(optionsHelp[this._commandWindow._index]);
}
Scene_Menu.prototype.createHelpWindow = function() {
this._helpWindow = new Window_Help();
this.addWindow(this._helpWindow);
this._helpWindow.y = 0;
this._helpWindow.x = 0;
this._helpWindow.width = 730;
this._helpWindow.height = 96;
};
})();
On all other menus, this method
"this._helpWindow.setText (optionsHelp [this._commandWindow._index])" worked.
But in this case, whenever I try to open the options menu the error appears:
"TypeError
Can not read property "_index" of undefined "
When I remove this index, I can get into the options menu and see the help window. But nothing appears in it.
Thanks in advance!