Advertisement
roninator2

Galv Menu Theme + KMS Generic Gauge

Dec 6th, 2024
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.47 KB | None | 0 0
  1. #==============================================================================
  2. # Compatibility Patch :                                         v1.0 (05/10/20)
  3. #   Galv Menu Theme + KMS Generic Gauge
  4. #==============================================================================
  5. # Script by:
  6. #     Mr. Bubble - recreated by Roninator2
  7. #--------------------------------------------------------------------------
  8. # Place this script below both Galv Menu Theme Engine 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_Themes"] && $kms_imported["GenericGauge"]
  21. class Window_MainMenuStatus < Window_MenuStatus
  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. end
  35.  
  36. class Window_Base < Window
  37.   def draw_gtp(actor, x, y, width = 124)
  38.     draw_actor_tp_gauge(actor, x, y, width)
  39.     change_color(system_color)
  40.     draw_text(x - 30, y + 7, 30, line_height, Vocab::tp_a,2)
  41.     change_color(tp_color(actor))
  42.     draw_text(x + width - 42, y + 3, 42, line_height, actor.tp.to_i, 2)
  43.   end
  44.  
  45.   def draw_ghp(actor, x, y, width = 124)
  46.     draw_actor_hp_gauge(actor, x, y, width)
  47.     change_color(system_color)
  48.     draw_text(x - 30, y + 7, 30, line_height, Vocab::hp_a,2)
  49.     draw_current_and_max_values(x, y + 3, width, actor.hp, actor.mhp,
  50.       hp_color(actor), normal_color)
  51.   end
  52.    
  53.   def draw_gmp(actor, x, y, width = 124)
  54.     draw_actor_mp_gauge(actor, x, y, width)
  55.     change_color(system_color)
  56.     draw_text(x - 30, y + 7, 30, line_height, Vocab::mp_a,2)
  57.     draw_current_and_max_values(x, y + 3, width, actor.mp, actor.mmp,
  58.       mp_color(actor), normal_color)
  59.   end
  60. end
  61. end # if $imported["Galv_Menu_Themes"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement