Hi people!
I'm making a plugin to add help windows to several scenes on the game.
It's working fine, but the problem is that I am using the update function of each scene to update the help windows(so it's updating every frame).
Ex:
But I've seen that this functions exists in window selectable:
So, I've tried to use that updateHelp instead of SceneUpdate's functions.
In the Shop Scene, I use that code and it works:
So I manage to add a help window in SceneTitle. But I can't update it as I did with scene Shop(using updateHelp), I can only update it if I use the Scene_title update.
So, I'm really confused on how the code is working on Mv. When the updateHelp is called? Every time I move the cursor? Select something?
I see that differences between the two scenes:
Scene_Shop.prototype = Object.create(Scene_MenuBase.prototype);
Scene_Title.prototype = Object.create(Scene_Base.prototype);
BUT, Scene_MenuBase has already inherity the Scene_Base, right?
Another thing that I can't figure it out while I'm looking at the code.
The help texts that we made in the editor for the items.
When we are in Scene_Item, every time I select another item, the Help windows is updating constantly to change the texts(every frame), or it updates only when I move the cursor, selecting items?
Or should I not be worried about using Scene Update functions to update my help windows in all scenes(menus, title, and shop)?
I'm making a plugin to add help windows to several scenes on the game.
It's working fine, but the problem is that I am using the update function of each scene to update the help windows(so it's updating every frame).
Ex:
Code:
Scene_GameEnd.prototype.update = function() {
Scene_MenuBase.prototype.update.call(this);
Eli.HelpWindows.setGameEndHelp();
};
Code:
Window_Selectable.prototype.setHelpWindow = function(helpWindow) {
this._helpWindow = helpWindow;
this.callUpdateHelp();
};
Window_Selectable.prototype.callUpdateHelp = function() {
if (this.active && this._helpWindow) {
this.updateHelp();
}
};
Window_Selectable.prototype.updateHelp = function() {
this._helpWindow.clear();
};
};
In the Shop Scene, I use that code and it works:
Code:
Scene_Shop.prototype.createCommandWindow = function() {
//Alias the function
this._commandWindow.setHelpWindow(this._helpWindow); //=== Add this.
};
Window_ShopCommand.prototype.updateHelp = function() {
Eli.HelpWindows.setShopHelp();
};
Code:
Window_TitleCommand.prototype.updateHelp = function() {
Eli.HelpWindows.setTitleHelp(); // ==== not working
Scene_Title.prototype.update = function() {
//Alias that function
//=== Add below
if(this._commandWindow.isOpenAndActive()) {
this._helpWindow.show();
this._helpWindow.open();
Eli.HelpWindows.setTitleHelp(); // ==== Working!
}
};
};
I see that differences between the two scenes:
Scene_Shop.prototype = Object.create(Scene_MenuBase.prototype);
Scene_Title.prototype = Object.create(Scene_Base.prototype);
BUT, Scene_MenuBase has already inherity the Scene_Base, right?
Another thing that I can't figure it out while I'm looking at the code.
The help texts that we made in the editor for the items.
When we are in Scene_Item, every time I select another item, the Help windows is updating constantly to change the texts(every frame), or it updates only when I move the cursor, selecting items?
Or should I not be worried about using Scene Update functions to update my help windows in all scenes(menus, title, and shop)?

