Guest User

Custom Menu 6 SumRndmDde

a guest
Apr 29th, 2016
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var _Scene_Menu_createBackground = Scene_Menu.prototype.createBackground;
  2.     Scene_Menu.prototype.createBackground = function() {
  3.         if(background) {
  4.             this._backgroundSprite = new Sprite();
  5.             this._backgroundSprite.bitmap = ImageManager.loadPicture(background);
  6.             this.addChild(this._backgroundSprite);
  7.             this._isBackgroundScaled = false;
  8.         } else {
  9.             _Scene_Menu_createBackground.call(this);
  10.         }
  11.     };
  12.  
  13.     var _Scene_Menu_update = Scene_Menu.prototype.update;
  14.     Scene_Menu.prototype.update = function() {
  15.         _Scene_Menu_update.call(this);
  16.         if(this._isBackgroundScaled == false && this._backgroundSprite.bitmap.width != 0) {
  17.             this._isBackgroundScaled = true;
  18.             this._backgroundSprite.scale.x = Number(Graphics.width / this._backgroundSprite.bitmap.width);
  19.             this._backgroundSprite.scale.y = Number(Graphics.height / this._backgroundSprite.bitmap.height);
  20.         }
  21.     };
  22.  
  23.     var _Scene_Equip_createBackground = Scene_Equip.prototype.createBackground;
  24.     Scene_Equip.prototype.createBackground = function() {
  25.         if(background) {
  26.             this._backgroundSprite = new Sprite();
  27.             this._backgroundSprite.bitmap = ImageManager.loadPicture(background);
  28.             this.addChild(this._backgroundSprite);
  29.             this._isBackgroundScaled = false;
  30.         } else {
  31.             _Scene_Equip_createBackground.call(this);
  32.         }
  33.     };
  34.  
  35.     var _Scene_Equip_update = Scene_Equip.prototype.update;
  36.     Scene_Equip.prototype.update = function() {
  37.         _Scene_Equip_update.call(this);
  38.         if(this._isBackgroundScaled == false && this._backgroundSprite.bitmap.width != 0) {
  39.             this._isBackgroundScaled = true;
  40.             this._backgroundSprite.scale.x = Number(Graphics.width / this._backgroundSprite.bitmap.width);
  41.             this._backgroundSprite.scale.y = Number(Graphics.height / this._backgroundSprite.bitmap.height);
  42.         }
  43.     };
  44.  
  45.     var _Scene_Options_createBackground = Scene_Options.prototype.createBackground;
  46.     Scene_Options.prototype.createBackground = function() {
  47.         if(background) {
  48.             this._backgroundSprite = new Sprite();
  49.             this._backgroundSprite.bitmap = ImageManager.loadPicture(background);
  50.             this.addChild(this._backgroundSprite);
  51.             this._isBackgroundScaled = false;
  52.         } else {
  53.             _Scene_Options_createBackground.call(this);
  54.         }
  55.     };
  56.  
  57.     var _Scene_Options_update = Scene_Options.prototype.update;
  58.     Scene_Options.prototype.update = function() {
  59.         _Scene_Options_update.call(this);
  60.         if(this._isBackgroundScaled == false && this._backgroundSprite.bitmap.width != 0) {
  61.             this._isBackgroundScaled = true;
  62.             this._backgroundSprite.scale.x = Number(Graphics.width / this._backgroundSprite.bitmap.width);
  63.             this._backgroundSprite.scale.y = Number(Graphics.height / this._backgroundSprite.bitmap.height);
  64.         }
  65.     };
  66.  
  67.     var _Scene_Status_createBackground = Scene_Status.prototype.createBackground;
  68.     Scene_Status.prototype.createBackground = function() {
  69.         if(backgroundStatus) {
  70.             this._backgroundSprite = new Sprite();
  71.             this._backgroundSprite.bitmap = ImageManager.loadPicture(backgroundStatus);
  72.             this.addChild(this._backgroundSprite);
  73.             this._isBackgroundScaled = false;
  74.         } else {
  75.             _Scene_Status_createBackground.call(this);
  76.         }
  77.     };
  78.  
  79.     var _Scene_Status_update = Scene_Status.prototype.update;
  80.     Scene_Status.prototype.update = function() {
  81.         _Scene_Status_update.call(this);
  82.         if(this._isBackgroundScaled == false && this._backgroundSprite.bitmap.width != 0) {
  83.             this._isBackgroundScaled = true;
  84.             this._backgroundSprite.scale.x = Number(Graphics.width / this._backgroundSprite.bitmap.width);
  85.             this._backgroundSprite.scale.y = Number(Graphics.height / this._backgroundSprite.bitmap.height);
  86.         }
  87.     };
  88.  
  89.     var _Scene_GameEnd_createBackground = Scene_GameEnd.prototype.createBackground;
  90.     Scene_GameEnd.prototype.createBackground = function() {
  91.         if(background) {
  92.             this._backgroundSprite = new Sprite();
  93.             this._backgroundSprite.bitmap = ImageManager.loadPicture(background);
  94.             this.addChild(this._backgroundSprite);
  95.             this._isBackgroundScaled = false;
  96.         } else {
  97.             _Scene_GameEnd_createBackground.call(this);
  98.         }
  99.     };
  100.  
  101.     var _Scene_GameEnd_update = Scene_GameEnd.prototype.update;
  102.     Scene_GameEnd.prototype.update = function() {
  103.         _Scene_GameEnd_update.call(this);
  104.         if(this._isBackgroundScaled == false && this._backgroundSprite.bitmap.width != 0) {
  105.             this._isBackgroundScaled = true;
  106.             this._backgroundSprite.scale.x = Number(Graphics.width / this._backgroundSprite.bitmap.width);
  107.             this._backgroundSprite.scale.y = Number(Graphics.height / this._backgroundSprite.bitmap.height);
  108.         }
  109.     };
  110.  
  111.     var _Scene_ItemBase_createBackground = Scene_ItemBase.prototype.createBackground;
  112.     Scene_ItemBase.prototype.createBackground = function() {
  113.         if(background) {
  114.             this._backgroundSprite = new Sprite();
  115.             this._backgroundSprite.bitmap = ImageManager.loadPicture(background);
  116.             this.addChild(this._backgroundSprite);
  117.             this._isBackgroundScaled = false;
  118.         } else {
  119.             _Scene_ItemBase_createBackground.call(this);
  120.         }
  121.     };
  122.  
  123.     var _Scene_Save_update = Scene_Save.prototype.update;
  124.     Scene_Save.prototype.update = function() {
  125.         _Scene_Save_update.call(this);
  126.         if(this._isBackgroundScaled == false && this._backgroundSprite.bitmap.width != 0) {
  127.             this._isBackgroundScaled = true;
  128.             this._backgroundSprite.scale.x = Number(Graphics.width / this._backgroundSprite.bitmap.width);
  129.             this._backgroundSprite.scale.y = Number(Graphics.height / this._backgroundSprite.bitmap.height);
  130.         }
  131.     };
  132.  
  133.     var _Scene_Save_createBackground = Scene_Save.prototype.createBackground;
  134.     Scene_Save.prototype.createBackground = function() {
  135.         if(background) {
  136.             this._backgroundSprite = new Sprite();
  137.             this._backgroundSprite.bitmap = ImageManager.loadPicture(background);
  138.             this.addChild(this._backgroundSprite);
  139.             this._isBackgroundScaled = false;
  140.         } else {
  141.             _Scene_Save_createBackground.call(this);
  142.         }
  143.     };
  144.  
  145.     var _Scene_ItemBase_update = Scene_ItemBase.prototype.update;
  146.     Scene_ItemBase.prototype.update = function() {
  147.         _Scene_ItemBase_update.call(this);
  148.         if(this._isBackgroundScaled == false && this._backgroundSprite.bitmap.width != 0) {
  149.             this._isBackgroundScaled = true;
  150.             this._backgroundSprite.scale.x = Number(Graphics.width / this._backgroundSprite.bitmap.width);
  151.             this._backgroundSprite.scale.y = Number(Graphics.height / this._backgroundSprite.bitmap.height);
  152.         }
  153.     };
Advertisement
Add Comment
Please, Sign In to add comment