Advertisement
roninator2

Galv Menu Layout + KMS Generic Gauge

Dec 6th, 2024
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.42 KB | None | 0 0
  1. #==============================================================================
  2. # Compatibility Patch :                                         v1.0 (05/10/20)
  3. #   Galv Menu Layout + KMS Generic Gauge
  4. #==============================================================================
  5. # Script by:
  6. #     Mr. Bubble - recreated by Roninator2
  7. #--------------------------------------------------------------------------
  8. # Place this script below both Galv Menu Layout and KMS Generic Gauge
  9. # in your script edtior.
  10. #
  11. #==============================================================================
  12.  
  13. $imported = {} if $imported.nil?
  14. $kms_imported = {} if $kms_imported.nil?
  15.  
  16. #==============================================================================
  17. # ■ Window_MainMenuStatus
  18. #==============================================================================
  19.  
  20. if $imported["Galv_Menu_Layout"] && $kms_imported["GenericGauge"]
  21. class Window_MenuStatus < Window_Selectable
  22.   #--------------------------------------------------------------------------
  23.   # * Draw Gauge
  24.   #     rate   : Rate (full at 1.0)
  25.   #     color1 : Left side gradation
  26.   #     color2 : Right side gradation
  27.   #--------------------------------------------------------------------------
  28.   def draw_gauge(x, y, width, rate, color1, color2)
  29.     fill_w = (width * rate).to_i
  30.     gauge_y = y + line_height - 8
  31.     contents.fill_rect(x, gauge_y, width, 6, gauge_back_color)
  32.     contents.gradient_fill_rect(x, gauge_y, fill_w, 6, color1, color2)
  33.   end
  34.  
  35.   def draw_actor_hp(actor, x, y, width = col_width)
  36.     draw_actor_hp_gauge(actor, x, y, width)
  37.     change_color(system_color)
  38.     draw_text(x, y, 30, line_height, Vocab::hp_a)
  39.     draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
  40.       hp_color(actor), normal_color)
  41.   end
  42.    
  43.   def draw_actor_mp(actor, x, y, width = col_width)
  44.     draw_actor_mp_gauge(actor, x, y, width)
  45.     change_color(system_color)
  46.     draw_text(x, y, 30, line_height, Vocab::mp_a)
  47.     draw_current_and_max_values(x, y + 3, width, actor.mp, actor.mmp,
  48.       mp_color(actor), normal_color)
  49.   end
  50.    
  51.   def draw_actor_tp(actor, x, y, width = col_width)
  52.     draw_actor_tp_gauge(actor, x, y, width)
  53.     change_color(system_color)
  54.     draw_text(x, y, 30, line_height, Vocab::tp_a)
  55.     change_color(tp_color(actor))
  56.     draw_text(x + width - 42, y, 42, line_height, actor.tp.to_i, 2)
  57.   end
  58.  
  59. end
  60. end # if $imported["Galv_Menu_Layout"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement