#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ...
#--------------------------------------------------------------------------
alias xrxs_bp7_refresh refresh
def refresh
if @update_cp_only
# run the original refresh
xrxs_bp7_refresh
return
end
# •`ŽÊ,ð‹ÖŽ~,µ,È,ª,ç-ß,·
@draw_ban = true
xrxs_bp7_refresh
# •`ŽÊ,̋֎~,ð‰ðœ
@draw_ban = false
# •`ŽÊ,ðŠJŽn
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 21
# Draw the Actor Graphic
if not defined? actor_graphic or not defined? actor_id_drawn or actor.id != actor_id_drawn
actor_id_drawn = actor.id
actor_graphic = draw_actor_graphic(actor, actor_x - 9, 116) #if not interpreter_running
end
# HP/SP Bars
draw_actor_hp_meter_line(actor, actor_x, 72, 96, 12)
draw_actor_sp_meter_line(actor, actor_x, 104, 96, 12)
# HP/SP Numbers
self.contents.font.size = 24
# Set Current HP Text Color
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? critical_color :
actor.hp <= actor.maxhp / 2 ? crisis_color : normal_color
draw_shadow_text(actor_x-2, 58, 96, 24, actor.hp.to_s, 2) #if not interpreter_running
# Set Current SP Text Color
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? critical_color :
actor.sp <= actor.maxsp / 2 ? crisis_color : normal_color
draw_shadow_text(actor_x-2, 90, 96, 24, actor.sp.to_s, 2) #if not interpreter_running
# --pŒêuHPv,Æ--pŒêuSPv,Ì•`ŽÊ
self.contents.font.size = 12 # --pŒêuHP/SPv,Ì•¶Žš,Ì'å,«,³
self.contents.font.color = system_color # --pŒêuHP/SPv,Ì•¶Žš,ÌF
draw_shadow_text(actor_x, 60, 96, 12, $data_system.words.hp) #if not interpreter_running
draw_shadow_text(actor_x, 92, 96, 12, $data_system.words.sp) #if not interpreter_running
draw_actor_state(actor, actor_x, 100) #if not interpreter_running
end
end
#============================================================================
# ¡ Window_Base
#============================================================================
class Window_Base < Window
attr_accessor :draw_actor_hp_meter_line
#--------------------------------------------------------------------------
# Draws HP Meter Bar
#--------------------------------------------------------------------------
def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
if not defined? @hp or actor.hp != @hp #or @actor_id != actor.id
@actor_id = actor.id
@hp = actor.hp
w = width * actor.hp / actor.maxhp
hp_color_1 = Color.new(255, 0, 0, 192)
hp_color_2 = Color.new(255, 255, 0, 192)
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
x -= 1
y += (height/4).floor
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
end