Guest User

Menu Transition

a guest
Dec 22nd, 2015
207
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*:
  2. * @plugindesc Adds a menu transition when you open up your menu scene.
  3. * @author Soulpour777
  4. *
  5. * @param Fade Speed
  6. * @desc The fade speed of your transition.
  7. * @default 24
  8. *
  9. * @param Transition Switch
  10. * @desc Switch to activate transitions in the menu.
  11. * @default 1
  12. *
  13. */
  14.  
  15. var SOUL_MV = SOUL_MV || {};
  16.  
  17. SOUL_MV.fadeSpeed = Number(PluginManager.parameters('Menu Transition')['Fade Speed'] || 24);
  18. SOUL_MV.switchID = Number(PluginManager.parameters('Menu Transition')['Transition Switch'] || 1);
  19.  
  20. Scene_Menu.prototype.fadeSpeed = function() {
  21.     return SOUL_MV.fadeSpeed;
  22. };
  23.  
  24. Scene_Menu.prototype.slowFadeSpeed = function() {
  25.     return this.fadeSpeed() * 2;
  26. };
  27.  
  28.  
  29. Scene_Menu.prototype.start = function() {
  30.     Scene_MenuBase.prototype.start.call(this);
  31.     this._statusWindow.refresh();
  32.     if($gameSwitches.value(SOUL_MV.switchID))this.startFadeIn(this.slowFadeSpeed(), false);
  33. };
RAW Paste Data