Guest User

Untitled

a guest
Jan 13th, 2017
74
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*:
  2. *
  3. * @This is my first plugin!
  4. *
  5. * @author Vito The Boss
  6. *
  7. * @help
  8. *
  9. * Hi everyone!
  10. * This is the help file
  11. * This is a plugin, that provides you
  12. * to set up a image as title commands!
  13. */
  14. var commandsImages = ['Menu01', 'Menu02', 'Menu03'];
  15.  
  16. var title_commandwindow = Scene_Title.prototype.createCommandWindow;
  17. Scene_Title.prototype.createCommandWindow = function() {
  18. title_commandwindow.call(this)
  19. this._commandWindow = new Window_TitleCommand();
  20. this._commandWindow.setHandler('newGame', this.commandNewGame.bind(this));
  21. this._commandWindow.setHandler('continue', this.commandContinue.bind(this));
  22. this._commandWindow.setHandler('options', this.commandOptions.bind(this));
  23. this.addWindow(this._commandWindow);
  24. };
  25.  
  26. var title_background = Scene_Title.prototype.createBackground;
  27. Scene_Title.prototype.createBackground = function (){
  28. title_background.call(this);
  29. this.removeChild(this._backSprite1);
  30. this._backSprite1 = new Sprite(ImageManager.loadSystem(commandsImages[0]));
  31. this.addChild(this._backSprite1);
  32. };
  33.  
  34. Scene_Title.prototype.titleChange = function () {
  35. this._backSprite1.bitmap = ImageManager.loadSystem(commandsImages[this._commandWindow._index]);
  36. }
  37.  
  38. var title_update = Scene_Title.prototype.update;
  39. Scene_Title.prototype.update = function() {
  40. title_update.call(this);
  41. this.titleChange();
  42. };
RAW Paste Data