Advertisement
Double_X

Reverse Actor Bars

Jun 16th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.27 KB | None | 0 0
  1. #==============================================================================|
  2. #  ** You need not edit this part as it's about how this snippet works         |
  3. #------------------------------------------------------------------------------|
  4.  
  5. #------------------------------------------------------------------------------|
  6. #  * Edit class: Window_Base                                                   |
  7. #------------------------------------------------------------------------------|
  8.  
  9. class Window_Base < Window
  10.  
  11.   #----------------------------------------------------------------------------|
  12.   #  Rewrite method: draw_gauge                                                |
  13.   #----------------------------------------------------------------------------|
  14.   def draw_gauge(x, y, width, rate, color1, color2)
  15.     # Rewritten to fill the gauge from right to left
  16.     fill_w = (width * (1 - rate)).to_i
  17.     #
  18.     gauge_y = y + line_height - 8
  19.     contents.fill_rect(x, gauge_y, width, 6, gauge_back_color)
  20.     # Rewritten to fill the gauge from right to left
  21.     contents.gradient_fill_rect(x + fill_w, gauge_y, width - fill_w, 6, color1, color2)
  22.     #
  23.   end # draw_gauge
  24.  
  25. end # Window_Base
  26.  
  27. #==============================================================================|
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement