Astfgl

AstfglGoldPos

Jun 9th, 2016
532
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //=============================================================================
  2. // Astfgl's Change Gold Unit position
  3. // by Astfgl
  4. // Date: 09/06/2016  
  5. // VO.2 Fix for large values
  6. //=============================================================================
  7.  
  8.  
  9. /*:
  10.  * @plugindesc Displays the currency unit before the value
  11.  * @author Astfgl
  12.  *
  13.  * @param No params are available.
  14.  * @desc -
  15.  * @default -  
  16.  
  17.  */
  18.  (function() {
  19.  
  20.   var parameters = PluginManager.parameters('AstgflGoldPos');
  21.  
  22.  
  23.     var _Astfgl_Window_Base_drawCurrencyValue = Window_Base.prototype.drawCurrencyValue
  24.  
  25. Window_Base.prototype.drawCurrencyValue = function(value, unit, x, y, width) {
  26.     var unitWidth = Math.min(80, this.textWidth(unit));
  27.     var valueWidth = Math.max(12, this.textWidth(value));
  28.     this.resetTextColor();
  29.     this.drawText(value, x , y, width, 'right');
  30.     this.resetTextColor();
  31.     this.changeTextColor(this.systemColor());
  32.     this.drawText(unit, x + width - valueWidth - unitWidth - 6, y, unitWidth , 'left');
  33. };
  34.  
  35.  })();
Advertisement
Add Comment
Please, Sign In to add comment