Advertisement
Zarsla

Encyclopedia in the Main Menu

Apr 24th, 2018
651
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. /*
  2. Add on for CGMV Encyclopedia to add it into the Main Menu
  3. */
  4.  
  5.  
  6. //=============================================================================
  7. //-----------------------------------------------------------------------------
  8. // Encyclopedia Added into The Main Menu
  9. //-----------------------------------------------------------------------------
  10.  
  11. OverWrite_WindowMenuCommand = Window_MenuCommand.prototype.addOriginalCommands;
  12. Window_MenuCommand.prototype.addOriginalCommands = function() {
  13. OverWrite_WindowMenuCommand.call(this);
  14. if(!Imported.YEP_MainMenuManager){
  15. this.addCommand(CGMV.Encyclopedia.EncyclopediaWindowTitle, 'encyclopedia', true);
  16. }
  17.  
  18. };
  19.  
  20. OverWrite_createCommandWindow = Scene_Menu.prototype.createCommandWindow;
  21. Scene_Menu.prototype.createCommandWindow = function() {
  22. OverWrite_createCommandWindow.call(this);
  23. this._commandWindow.setHandler('encyclopedia', this.commandEncyclopedia.bind(this));
  24. }
  25.  
  26. Scene_Menu.prototype.commandEncyclopedia = function() {
  27. SceneManager.push(CGMV_Scene_Encyclopedia);
  28.  
  29. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement