Guest User

Event Item Description Window

a guest
Oct 11th, 2017
2,132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var Ossra = Ossra || {};
  2.  
  3. Ossra.Window_EventItem_updatePlacement = Window_EventItem.prototype.updatePlacement;
  4.  
  5. Window_EventItem.prototype.updatePlacement = function() {
  6.     Ossra.Window_EventItem_updatePlacement.call(this);
  7.  
  8.     if (this._helpWindow) {
  9.       this._helpWindow.y = this.y;
  10.       this.y = this._helpWindow.y + this._helpWindow.height;
  11.     }
  12. };
  13.  
  14. Window_EventItem.prototype.setHelpWindow = function(helpWindow) {
  15.     Window_ItemList.prototype.setHelpWindow.call(this, helpWindow);
  16.     if (this._helpWindow) {
  17.       this._helpWindow.hide();
  18.       this._helpWindow.close();
  19.     }
  20. };
  21.  
  22. Window_EventItem.prototype.open = function() {
  23.     Window_ItemList.prototype.open.call(this);
  24.     if (this._helpWindow) {
  25.       this._helpWindow.show();
  26.       this._helpWindow.open();
  27.     }
  28. };
  29.  
  30. Window_EventItem.prototype.close = function() {
  31.     Window_ItemList.prototype.close.call(this);
  32.     if (this._helpWindow) {
  33.       this._helpWindow.hide();
  34.       this._helpWindow.close();
  35.     }
  36. };
  37.  
  38. Ossra.Window_Message_subWindows = Window_Message.prototype.subWindows;
  39.  
  40. Window_Message.prototype.subWindows = function() {
  41.   var tmpWindows = Ossra.Window_Message_subWindows.call(this);
  42.   tmpWindows.push(this._helpWindow)
  43.   return tmpWindows;
  44. };
  45.  
  46. Ossra.Window_Message_createSubWindows = Window_Message.prototype.createSubWindows;
  47.  
  48. Window_Message.prototype.createSubWindows = function() {
  49.     Ossra.Window_Message_createSubWindows.call(this);
  50.  
  51.     this._helpWindow = new Window_Help();
  52.     this._itemWindow.setHelpWindow(this._helpWindow);
  53. };
Add Comment
Please, Sign In to add comment