Advertisement
roninator2

Cozziekuns Earthbound Addon - Draw Face

Dec 17th, 2024
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.01 KB | None | 0 0
  1. module R2_Cozzie_Status_Back_Color
  2.   Back = Color.new(0,65,155,180) # color for back when Show_Back == false
  3.   Show_Back = false # show default status window
  4. end
  5. class Window_BattleStatus < Window_Selectable
  6.   def draw_window_frame(x, y, w, h)
  7.     contents.blt(x, y, windowskin, Rect.new(64,0,16,16))
  8.     contents.blt(x+w-16, y, windowskin, Rect.new(112,0,16,16))
  9.     contents.blt(x, y+h-16, windowskin, Rect.new(64,48,16,16))
  10.     contents.blt(x+w-16, y+h-16, windowskin, Rect.new(112,48,16,16))
  11.     adjust = $game_party.battle_members.size
  12.     contents.fill_rect(x + 6, y + 6, adjust % 3 == 0 ? 117 : 119, 108, R2_Cozzie_Status_Back_Color::Back) unless
  13.     R2_Cozzie_Status_Back_Color::Show_Back == true
  14.     i=0
  15.     while i < w-32 do
  16.       contents.blt(x+16+i, y, windowskin, Rect.new(80,0,[w-32-i,32].min,16))
  17.       contents.blt(x+16+i, y+h-16, windowskin, Rect.new(80,48,[w-32-i,32].min,16))
  18.       i+=32
  19.     end
  20.     i=0
  21.     while i < h-32 do
  22.       contents.blt(x, y+16+i, windowskin, Rect.new(64,16,16,[h-32-i,32].min))
  23.       contents.blt(x+w-16, y+16+i, windowskin, Rect.new(112,16,16,[h-32-i,32].min))
  24.       i+=32
  25.     end  
  26.   end
  27.  
  28.   def draw_basic_area(rect, actor)
  29.     draw_window_frame(rect.x, rect.y, rect.width, rect.height)
  30.     draw_actor_name(actor, rect.x, rect.y + 3, rect.width)
  31.     draw_actor_icons(actor, rect.x + 4, rect.y + line_height, rect.width)
  32.   end
  33.  
  34.   def draw_gauge_area_with_tp(rect, actor)
  35.     draw_gauge_area_without_tp(rect, actor)
  36.     draw_actor_tp(actor, rect.x + 8, rect.y + line_height * 4 - 5, rect.width - 18)
  37.   end
  38.  
  39.   def draw_gauge_area_without_tp(rect, actor)
  40.     draw_actor_hp(actor, rect.x + 8, rect.y + line_height * 2 - 5, rect.width - 18)
  41.     draw_actor_mp(actor, rect.x + 8, rect.y + line_height * 3 - 5, rect.width - 18)
  42.   end
  43.  
  44. end
  45.  
  46. class Scene_Battle < Scene_Base
  47.   alias r2_status_window_hide create_status_window
  48.   def create_status_window
  49.     r2_status_window_hide
  50.     @status_window.opacity = 0 if R2_Cozzie_Status_Back_Color::Show_Back == false
  51.   end
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement