Advertisement
Kakakadafi

SRD_AltMenuScreen_IconCycle

Jun 29th, 2016
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*:
  2.  * @plugindesc Alternative Menu Screen Icon Cycle. Uses Icons and allows the Player to cycle through them.
  3.  * @author SumRndmDde
  4.  *
  5.  * @param Item Icon
  6.  * @desc The icon index of the icon used for the "Item" choice.
  7.  * Right-click and press "IconSet Viewer".
  8.  * @default 176
  9.  *
  10.  * @param Skill Icon
  11.  * @desc The icon index of the icon used for the "Skill" choice.
  12.  * Right-click and press "IconSet Viewer".
  13.  * @default 64
  14.  *
  15.  * @param Equip Icon
  16.  * @desc The icon index of the icon used for the "Equip" choice.
  17.  * Right-click and press "IconSet Viewer".
  18.  * @default 96
  19.  *
  20.  * @param Status Icon
  21.  * @desc The icon index of the icon used for the "Status" choice.
  22.  * Right-click and press "IconSet Viewer".
  23.  * @default 87
  24.  *
  25.  * @param Formation Icon
  26.  * @desc The icon index of the icon used for the "Formation" choice.
  27.  * Right-click and press "IconSet Viewer".
  28.  * @default 82
  29.  *
  30.  * @param Options Icon
  31.  * @desc The icon index of the icon used for the "Options" choice.
  32.  * Right-click and press "IconSet Viewer".
  33.  * @default 83
  34.  *
  35.  * @param Save Icon
  36.  * @desc The icon index of the icon used for the "Save" choice.
  37.  * Right-click and press "IconSet Viewer".
  38.  * @default 225
  39.  *
  40.  * @param Game End Icon
  41.  * @desc The icon index of the icon used for the "Game End" choice.
  42.  * Right-click and press "IconSet Viewer".
  43.  * @default 245
  44.  *
  45.  * @param == Icon Cycle ==
  46.  * @default
  47.  *
  48.  * @param Cycle Speed
  49.  * @desc Speed in which the circle cycles.
  50.  * Can be Number or JavaScript evaluation.
  51.  * @default 0.05
  52.  *
  53.  * @param Cycle Anchor
  54.  * @desc Angle where the main Icon goes.
  55.  * Can be Number or JavaScript evaluation.
  56.  * @default Math.PI * (3/2)
  57.  *
  58.  * @param Cycle Radius
  59.  * @desc The radius of the circle the Icons cycle on.
  60.  * Can be Number or JavaScript evaluation.
  61.  * @default 120
  62.  *
  63.  * @param Cycle X
  64.  * @desc The X position of the circle the Icons cycle on.
  65.  * Can be Number or JavaScript evaluation.
  66.  * @default 160
  67.  *
  68.  * @param Cycle Y
  69.  * @desc The Y position of the circle the Icons cycle on.
  70.  * Can be Number or JavaScript evaluation.
  71.  * @default 140
  72.  *
  73.  * @param == Icon Window ==
  74.  * @default
  75.  *
  76.  * @param Icon Window Background Visibility
  77.  * @desc The visibility of the window bitmap. The window contents remains visible.
  78.  * @default false
  79.  *
  80.  * @param Icon Window X
  81.  * @desc The X position of the command (icons) window.
  82.  * Can be Number or JavaScript evaluation.
  83.  * @default (Graphics.width / 2) - (this._commandWindow.width / 2)
  84.  *
  85.  * @param Icon Window Y
  86.  * @desc The Y position of the command (icons) window.
  87.  * Can be Number or JavaScript evaluation.
  88.  * @default (Graphics.height / 2) - (this._commandWindow.height / 2)
  89.  *
  90.  * @param Icon Window Width
  91.  * @desc The width of the command (icons) window.
  92.  * Can be Number or JavaScript evaluation.
  93.  * @default 370
  94.  *
  95.  * @param Icon Window Height
  96.  * @desc The height of the command (icons) window.
  97.  * Can be Number or JavaScript evaluation.
  98.  * @default 370
  99.  *
  100.  * @param == Actor Window ==
  101.  * @default
  102.  *
  103.  * @param Text Align
  104.  * @desc The alignment of the text in the window.
  105.  * Can be: 'left', 'right', or 'center'.
  106.  * @default center
  107.  *
  108.  * @param Actor Window X
  109.  * @desc The X position of the actor window.
  110.  * Can be Number or JavaScript evaluation.
  111.  * @default (Graphics.width / 2) - (this._statusWindow.width / 2)
  112.  *
  113.  * @param Actor Window Y
  114.  * @desc The Y position of the actor window.
  115.  * Can be Number or JavaScript evaluation.
  116.  * @default (Graphics.height / 2) - (this._statusWindow.height / 2)
  117.  *
  118.  * @param == Gold Window ==
  119.  * @default
  120.  *
  121.  * @param Gold Window X
  122.  * @desc The X position of the gold window.
  123.  * Can be Number or JavaScript evaluation.
  124.  * @default 0
  125.  *
  126.  * @param Gold Window Y
  127.  * @desc The Y position of the gold window.
  128.  * Can be Number or JavaScript evaluation.
  129.  * @default Graphics.boxHeight - this._goldWindow.height
  130.  *
  131.  * @param == Custom Commands ==
  132.  * @default
  133.  *
  134.  * @param Command Symbol 1
  135.  * @desc The symbol of the command that will have Command Icon 1.
  136.  * The order it's listed in the Parameters is irrelevant.
  137.  * @default
  138.  *
  139.  * @param Command Icon 1
  140.  * @desc The icon of the command that will have Command Icon 1.
  141.  * The order it's listed in the Parameters is irrelevant.
  142.  * @default
  143.  *
  144.  * @param Command Symbol 2
  145.  * @desc The symbol of the command that will have Command Icon 2.
  146.  * The order it's listed in the Parameters is irrelevant.
  147.  * @default
  148.  *
  149.  * @param Command Icon 2
  150.  * @desc The icon of the command that will have Command Icon 2.
  151.  * The order it's listed in the Parameters is irrelevant.
  152.  * @default
  153.  *
  154.  * @param Command Symbol 3
  155.  * @desc The symbol of the command that will have Command Icon 3.
  156.  * The order it's listed in the Parameters is irrelevant.
  157.  * @default
  158.  *
  159.  * @param Command Icon 3
  160.  * @desc The icon of the command that will have Command Icon 3.
  161.  * The order it's listed in the Parameters is irrelevant.
  162.  * @default
  163.  *
  164.  * @param Command Symbol 4
  165.  * @desc The symbol of the command that will have Command Icon 4.
  166.  * The order it's listed in the Parameters is irrelevant.
  167.  * @default
  168.  *
  169.  * @param Command Icon 4
  170.  * @desc The icon of the command that will have Command Icon 4.
  171.  * The order it's listed in the Parameters is irrelevant.
  172.  * @default
  173.  *
  174.  * @param Command Symbol 5
  175.  * @desc The symbol of the command that will have Command Icon 5.
  176.  * The order it's listed in the Parameters is irrelevant.
  177.  * @default
  178.  *
  179.  * @param Command Icon 5
  180.  * @desc The icon of the command that will have Command Icon 5.
  181.  * The order it's listed in the Parameters is irrelevant.
  182.  * @default
  183.  *
  184.  * @param Command Symbol 6
  185.  * @desc The symbol of the command that will have Command Icon 6.
  186.  * The order it's listed in the Parameters is irrelevant.
  187.  * @default
  188.  *
  189.  * @param Command Icon 6
  190.  * @desc The icon of the command that will have Command Icon 6.
  191.  * The order it's listed in the Parameters is irrelevant.
  192.  * @default
  193.  *
  194.  * @param Command Symbol 7
  195.  * @desc The symbol of the command that will have Command Icon 7.
  196.  * The order it's listed in the Parameters is irrelevant.
  197.  * @default
  198.  *
  199.  * @param Command Icon 7
  200.  * @desc The icon of the command that will have Command Icon 7.
  201.  * The order it's listed in the Parameters is irrelevant.
  202.  * @default
  203.  *
  204.  * @param Command Symbol 8
  205.  * @desc The symbol of the command that will have Command Icon 8.
  206.  * The order it's listed in the Parameters is irrelevant.
  207.  * @default
  208.  *
  209.  * @param Command Icon 8
  210.  * @desc The icon of the command that will have Command Icon 8.
  211.  * The order it's listed in the Parameters is irrelevant.
  212.  * @default
  213.  *
  214.  * @param Command Symbol 9
  215.  * @desc The symbol of the command that will have Command Icon 9.
  216.  * The order it's listed in the Parameters is irrelevant.
  217.  * @default
  218.  *
  219.  * @param Command Icon 9
  220.  * @desc The icon of the command that will have Command Icon 9.
  221.  * The order it's listed in the Parameters is irrelevant.
  222.  * @default
  223.  *
  224.  * @param Command Symbol 10
  225.  * @desc The symbol of the command that will have Command Icon 10.
  226.  * The order it's listed in the Parameters is irrelevant.
  227.  * @default
  228.  *
  229.  * @param Command Icon 10
  230.  * @desc The icon of the command that will have Command Icon 10.
  231.  * The order it's listed in the Parameters is irrelevant.
  232.  * @default
  233.  *
  234.  * @param Command Symbol 11
  235.  * @desc The symbol of the command that will have Command Icon 11.
  236.  * The order it's listed in the Parameters is irrelevant.
  237.  * @default
  238.  *
  239.  * @param Command Icon 11
  240.  * @desc The icon of the command that will have Command Icon 11.
  241.  * The order it's listed in the Parameters is irrelevant.
  242.  * @default
  243.  *
  244.  * @param Command Symbol 12
  245.  * @desc The symbol of the command that will have Command Icon 12.
  246.  * The order it's listed in the Parameters is irrelevant.
  247.  * @default
  248.  *
  249.  * @param Command Icon 12
  250.  * @desc The icon of the command that will have Command Icon 12.
  251.  * The order it's listed in the Parameters is irrelevant.
  252.  * @default
  253.  *
  254.  * @param Command Symbol 13
  255.  * @desc The symbol of the command that will have Command Icon 13.
  256.  * The order it's listed in the Parameters is irrelevant.
  257.  * @default
  258.  *
  259.  * @param Command Icon 13
  260.  * @desc The icon of the command that will have Command Icon 13.
  261.  * The order it's listed in the Parameters is irrelevant.
  262.  * @default
  263.  *
  264.  * @param Command Symbol 14
  265.  * @desc The symbol of the command that will have Command Icon 14.
  266.  * The order it's listed in the Parameters is irrelevant.
  267.  * @default
  268.  *
  269.  * @param Command Icon 14
  270.  * @desc The icon of the command that will have Command Icon 14.
  271.  * The order it's listed in the Parameters is irrelevant.
  272.  * @default
  273.  *
  274.  * @param Command Symbol 15
  275.  * @desc The symbol of the command that will have Command Icon 15.
  276.  * The order it's listed in the Parameters is irrelevant.
  277.  * @default
  278.  *
  279.  * @param Command Icon 15
  280.  * @desc The icon of the command that will have Command Icon 15.
  281.  * The order it's listed in the Parameters is irrelevant.
  282.  * @default
  283.  *
  284.  * @param Command Symbol 16
  285.  * @desc The symbol of the command that will have Command Icon 16.
  286.  * The order it's listed in the Parameters is irrelevant.
  287.  * @default
  288.  *
  289.  * @param Command Icon 16
  290.  * @desc The icon of the command that will have Command Icon 16.
  291.  * The order it's listed in the Parameters is irrelevant.
  292.  * @default
  293.  *
  294.  * @param Command Symbol 17
  295.  * @desc The symbol of the command that will have Command Icon 17.
  296.  * The order it's listed in the Parameters is irrelevant.
  297.  * @default
  298.  *
  299.  * @param Command Icon 17
  300.  * @desc The icon of the command that will have Command Icon 17.
  301.  * The order it's listed in the Parameters is irrelevant.
  302.  * @default
  303.  *
  304.  * @param Command Symbol 18
  305.  * @desc The symbol of the command that will have Command Icon 18.
  306.  * The order it's listed in the Parameters is irrelevant.
  307.  * @default
  308.  *
  309.  * @param Command Icon 18
  310.  * @desc The icon of the command that will have Command Icon 18.
  311.  * The order it's listed in the Parameters is irrelevant.
  312.  * @default
  313.  *
  314.  * @param Command Symbol 19
  315.  * @desc The symbol of the command that will have Command Icon 19.
  316.  * The order it's listed in the Parameters is irrelevant.
  317.  * @default
  318.  *
  319.  * @param Command Icon 19
  320.  * @desc The icon of the command that will have Command Icon 19.
  321.  * The order it's listed in the Parameters is irrelevant.
  322.  * @default
  323.  *
  324.  * @param Command Symbol 20
  325.  * @desc The symbol of the command that will have Command Icon 20.
  326.  * The order it's listed in the Parameters is irrelevant.
  327.  * @default
  328.  *
  329.  * @param Command Icon 20
  330.  * @desc The icon of the command that will have Command Icon 20.
  331.  * The order it's listed in the Parameters is irrelevant.
  332.  * @default
  333.  *
  334.  * @help
  335.  *
  336.  *
  337.  * Alternative Menu Screen: Icon Cycle
  338.  * Version 1.00
  339.  * SumRndmDde
  340.  *
  341.  *
  342.  * Gives your game an alternative menu screen.
  343.  *
  344.  * This menu is based off of a wheel that cycles through Icons.
  345.  *
  346.  * You can manipulate the Icons used by using the Parameters at the top
  347.  * of the list.
  348.  *
  349.  *
  350.  * ==========================================================================
  351.  *  Setting up Icons for Custom Commands
  352.  * ==========================================================================
  353.  *
  354.  * At the very bottom of the Parameter list, there are places available
  355.  * for inputting Icons for custom commands.
  356.  *
  357.  * You need to first provide the "symbol" of the command.
  358.  * (A symbol is usually a word. For example, the symbol for the Debug
  359.  * Command added by Yanfly's Main Menu Manager is "debug" (without quotes))
  360.  *
  361.  * Then, after you have done so, you can place the Icon Index in the
  362.  * proceeding Parameter.
  363.  *
  364.  * If you're using Yanfly's Main Menu Manager, you can find a command's
  365.  * symbol in the Parameter section it's help in.
  366.  *
  367.  *
  368.  * On the other hand, if you have a Plugin that adds a command without
  369.  * telling you the symbol for it, leave a comment on the YouTube video
  370.  * or Forum post linking me to the Plugin; I'll help ya. ~
  371.  *
  372.  *
  373.  * ==========================================================================
  374.  *  End of Help File
  375.  * ==========================================================================
  376.  *
  377.  * Welcome to the bottom of the Help file.
  378.  *
  379.  *
  380.  * Thanks for reading!
  381.  * If you have questions, or if you enjoyed this Plugin, please check
  382.  * out my YouTube channel!
  383.  *
  384.  * https://www.youtube.com/c/SumRndmDde
  385.  *
  386.  *
  387.  * Until next time,
  388.  *   ~ SumRndmDde
  389.  */
  390.  
  391. var Imported = Imported || {};
  392.  
  393. (function() {
  394.    
  395.     var icons = {};
  396.     icons['item'] = Number(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Item Icon']);
  397.     icons['skill'] = Number(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Skill Icon']);
  398.     icons['equip'] = Number(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Equip Icon']);
  399.     icons['status'] = Number(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Status Icon']);
  400.     icons['formation'] = Number(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Formation Icon']);
  401.     icons['options'] = Number(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Options Icon']);
  402.     icons['save'] = Number(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Save Icon']);
  403.     icons['gameEnd'] = Number(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Game End Icon']);
  404.  
  405.     for(var i = 1; i <= 20; i++) {
  406.         var sym = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Command Symbol ' + i]);
  407.         if(sym.trim().length > 0) {
  408.             icons[sym] = Number(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Command Icon ' + i]);
  409.         }
  410.     }
  411.     var _cycS = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Cycle Speed']);
  412.     var _cycA = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Cycle Anchor']);
  413.     var _cycR = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Cycle Radius']);
  414.     var _cycX = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Cycle X']);
  415.     var _cycY = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Cycle Y']);
  416.  
  417.     var _visible = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Icon Window Background Visibility']);
  418.     var _visible = eval(_visible);
  419.     var _x = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Icon Window X']);
  420.     var _y = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Icon Window Y']);
  421.     var _w = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Icon Window Width']);
  422.     var _h = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Icon Window Height']);
  423.  
  424.     var _actorX = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Actor Window X']);
  425.     var _actorY = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Actor Window Y']);
  426.     var _align = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Text Align']);
  427.     var _goldX = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Gold Window X']);
  428.     var _goldY = String(PluginManager.parameters('SRD_AltMenuScreen_IconCycle')['Gold Window Y']);
  429.  
  430.     SceneManager.snapForBg = function() {
  431.         this._bgBitmap = this.snap();
  432.     };
  433.     SceneManager.bgBitmap = function() {
  434.         return this._bgBitmap;
  435.     };
  436.     var Scene_Map_callMenu = Scene_Map.prototype.callMenu;
  437.     Scene_Map.prototype.callMenu = function() {
  438.         SceneManager.snapForBg();
  439.         Scene_Map_callMenu.call(this);
  440.     };
  441.     var _Scene_Menu_create = Scene_Menu.prototype.create;
  442.     Scene_Menu.prototype.create = function() {
  443.         _Scene_Menu_create.call(this);
  444.         this._commandWindow.x = $gamePlayer.screenX() - (this._commandWindow.width / 2);//eval(_x);
  445.         this._commandWindow.y = $gamePlayer.screenY() - (this._commandWindow.height / 2);//eval(_y);
  446.         this._statusWindow.x = eval(_actorX);
  447.         this._statusWindow.y = eval(_actorY);
  448.         this._goldWindow.x = eval(_goldX);
  449.         this._goldWindow.y = eval(_goldY);
  450.     };
  451.     Scene_MenuBase.prototype.createBackground = function() {
  452.         this._backgroundSprite = new Sprite();
  453.         this._backgroundSprite.bitmap = SceneManager.bgBitmap();
  454.         this.addChild(this._backgroundSprite);
  455.     };
  456.     var _Scene_Menu_commandPersonal = Scene_Menu.prototype.commandPersonal;
  457.     Scene_Menu.prototype.commandPersonal = function() {
  458.         this._statusWindow.open();
  459.         _Scene_Menu_commandPersonal.call(this);
  460.     };
  461.     var _Scene_Menu_onPersonalCancel = Scene_Menu.prototype.onPersonalCancel;
  462.     Scene_Menu.prototype.onPersonalCancel = function() {
  463.         _Scene_Menu_onPersonalCancel.call(this);
  464.         this._statusWindow.close();
  465.     };
  466.     var _Scene_Menu_commandFormation = Scene_Menu.prototype.commandFormation;
  467.     Scene_Menu.prototype.commandFormation = function() {
  468.         this._statusWindow.open();
  469.         _Scene_Menu_commandFormation.call(this);
  470.     };
  471.     var _Scene_Menu_onFormationCancel = Scene_Menu.prototype.onFormationCancel;
  472.     Scene_Menu.prototype.onFormationCancel = function() {
  473.         _Scene_Menu_onFormationCancel.call(this);
  474.         this._statusWindow.close();
  475.     };
  476.     var _Window_MenuCommand_initialize = Window_MenuCommand.prototype.initialize;
  477.     Window_MenuCommand.prototype.initialize = function(x, y) {
  478.         _Window_MenuCommand_initialize.call(this, x, y);
  479.         this._tempIndex = -1;
  480.         this._animationCycle = 0;
  481.         this._animationSpeed = 0;
  482.         if (!_visible) {
  483.             this.opacity = 0;
  484.             this.contents.paintOpacity = 255;
  485.         }
  486.     };
  487.     Window_MenuCommand.prototype.windowWidth = function() {
  488.         return eval(_w);
  489.     };
  490.     Window_MenuCommand.prototype.windowHeight = function() {
  491.         return eval(_h);
  492.     };
  493.     Window_MenuCommand.prototype.maxCols = function() {
  494.         return this.maxItems();
  495.     };
  496.     Window_MenuCommand.prototype.numVisibleRows = function() {
  497.         return 1;
  498.     };
  499.     Window_MenuCommand.prototype.textPadding = function() {
  500.         return 6;
  501.     };
  502.     Window_MenuCommand.prototype.drawItem = function(index) {
  503.         var coords = this.getCoordinatesForIndex(index);
  504.         var align = this.itemTextAlign();
  505.         var symbol = this.commandSymbol(index);
  506.         var enabled = this.isCommandEnabled(index);
  507.         this.resetTextColor();
  508.         var bitmap = ImageManager.loadSystem('IconSet');
  509.         var pw = Window_Base._iconWidth;
  510.         var ph = Window_Base._iconHeight;
  511.         var sx = icons[symbol] % 16 * pw;
  512.         var sy = Math.floor(icons[symbol] / 16) * ph;
  513.         if(!enabled) this.contents.paintOpacity = 100;
  514.         this.contents.blt(bitmap, sx, sy, pw, ph, coords.x, coords.y);
  515.         if(!enabled) this.contents.paintOpacity = 255;
  516.         if(this.currentData()) {
  517.             var width = this.textWidth(this.currentData().name) + 20;
  518.             var height = this.lineHeight();
  519.             this.drawText(this.currentData().name, (this.width / 2) - (width / 2),
  520.                 (this.height / 2) - (height / 2), this.width);
  521.         }
  522.     };
  523.     Window_MenuCommand.prototype._refreshCursor = function() {
  524.     };
  525.     Window_MenuCommand.prototype.getCoordinatesForIndex = function(index) {
  526.         index = index - this.index();
  527.         var result = {x: 0, y: 0};
  528.         var portions = ((Math.PI * 2) / this.maxItems());
  529.         var angle = eval(_cycA) + (portions * index) - this._animationCycle;
  530.         result.x = Math.round(Math.cos(angle)*eval(_cycR)) + eval(_cycX);
  531.         result.y = Math.round(Math.sin(angle)*eval(_cycR)) + eval(_cycY);
  532.         return result;
  533.     };
  534.     Window_MenuCommand.prototype.cursorLeft = function(wrap) {
  535.         if(this._animationCycle <= 0) {
  536.             var index = this.index();
  537.             var maxItems = this.maxItems();
  538.             var maxCols = this.maxCols();
  539.             wrap = true;
  540.             if (maxCols >= 2 && (index > 0 || (wrap))) {
  541.                 this.select((index - 1 + maxItems) % maxItems);
  542.             }
  543.             this._animationCycle += ((Math.PI * 2) / this.maxItems());
  544.             this._animationSpeed = eval(_cycS);
  545.         }
  546.     };
  547.     Window_MenuCommand.prototype.cursorRight = function(wrap) {
  548.         if(this._animationCycle >= 0) {
  549.             var index = this.index();
  550.             var maxItems = this.maxItems();
  551.             var maxCols = this.maxCols();
  552.             wrap = true;
  553.             if (maxCols >= 2 && (index < maxItems - 1 || (wrap))) {
  554.                 this.select((index + 1) % maxItems);
  555.             }
  556.             this._animationCycle += -((Math.PI * 2) / this.maxItems());
  557.             this._animationSpeed = eval(_cycS);
  558.         }
  559.     };
  560.     var _Window_MenuCommand_update = Window_MenuCommand.prototype.update;
  561.     Window_MenuCommand.prototype.update = function() {
  562.         _Window_MenuCommand_update.call(this);
  563.         if(this._animationCycle === undefined) this._animationCycle = 0;
  564.         if(this._tempIndex != this.index()) {
  565.             this.contents.clear();
  566.             this._tempIndex = this.index();
  567.             this.drawAllItems();
  568.         }
  569.         if(Math.abs(this._animationCycle) > 0) {
  570.             if(this._animationCycle > 0) this._animationCycle -= this._animationSpeed;
  571.             if(this._animationCycle < 0) this._animationCycle += this._animationSpeed;
  572.             if(Math.abs(this._animationCycle) < this._animationSpeed) this._animationCycle = 0;
  573.             this.contents.clear();
  574.             this.drawAllItems();
  575.         }
  576.     }
  577.     var _Window_MenuStatus_initialize = Window_MenuStatus.prototype.initialize;
  578.     Window_MenuStatus.prototype.initialize = function(x, y) {
  579.         _Window_MenuStatus_initialize.call(this, x, y);
  580.         this.openness = 0;
  581.     };
  582.     Window_MenuStatus.prototype.windowWidth = function() {
  583.         return 240;
  584.     };
  585.     Window_MenuStatus.prototype.windowHeight = function() {
  586.         return this.fittingHeight(this.numVisibleRows());
  587.     };
  588.     Window_MenuStatus.prototype.numVisibleRows = function() {
  589.         return Math.ceil(this.maxItems() / this.maxCols());
  590.     };
  591.     Window_MenuStatus.prototype.itemHeight = function() {
  592.         return this.lineHeight();
  593.     };
  594.     Window_MenuStatus.prototype.drawItem = function(index) {
  595.         this.drawItemBackground(index);
  596.         var rect = this.itemRectForText(index);
  597.         var align = _align;
  598.         this.resetTextColor();
  599.         this.drawText($gameParty.members()[index].name(), rect.x, rect.y, rect.width, align);
  600.     };
  601.     if(Imported.YEP_MainMenuManager) {
  602.         Scene_Menu.prototype.resizeGoldWindow = function() {};
  603.     }
  604. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement