#================================================= =============================
# ** Window_BattleStatus
#------------------------------------------------------------------------------
# This window displays the status of all party members on the battle screen.
#================================================= =============================
class Window_BattleStatus < Window_Base
#================================================= =========================
# * Draw Slant Bar(by SephirothSpawn)
#================================================= =========================
def draw_slant_bar(x, y, min, max, width = 152, height = 6,
bar_color = Color.new(150, 0, 0, 255),
end_color = Color.new(255, 255, 60, 255))
# Draw Border
for i in 0..height
self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
end
# Draw Background
for i in 1..(height - 1)
r = 100 * (height - i) / height + 0 * i / height
g = 100 * (height - i) / height + 0 * i / height
b = 100 * (height - i) / height + 0 * i / height
a = 255 * (height - i) / height + 255 * i / height
self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
end
# Draws Bar
for i in 1..( (min.to_f / max.to_f) * width - 1)
for j in 1..(height - 1)
r = bar_color.red * (width - i) / width + end_color.red * i / width
g = bar_color.green * (width - i) / width + end_color.green * i / width
b = bar_color.blue * (width - i) / width + end_color.blue * i / width
a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
end
end
end
#================================================= =========================
# * Draw HP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#================================================= =========================
alias :draw_actor_hp_hpsp :draw_actor_hp
def draw_actor_hp(actor, x, y, width = 144)
draw_slant_bar(x, y + 12, actor.hp, actor.maxhp, width, 6,
bar_color = Color.new(150, 0, 0, 255),
end_color = Color.new(255, 255, 60, 255))
draw_actor_hp_hpsp(actor, x, y, width)
end
#================================================= =========================
# * Draw SP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#================================================= =========================
alias :draw_actor_sp_hpsp :draw_actor_sp
def draw_actor_sp(actor, x, y, width = 144)
draw_slant_bar(x, y + 12, actor.sp, actor.maxsp, width, 6,
bar_color = Color.new(0, 0, 155, 255),
end_color = Color.new(255, 255, 255, 255))
draw_actor_sp_hpsp(actor, x, y, width)
end
#=========================================================================
# * Draw Actor Limit Break Bar
# actor : Actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#=========================================================================
def draw_actor_lb(actor, x, y, width = 144)
rate = actor.limitbreak.to_f / LB_MAX
plus_x = -2
rate_x = 0
plus_y = 12
plus_width = 0
rate_width = 100
height = 6
lb = (width + plus_width) * actor.limitbreak * rate_width / 100 / LB_MAX
# Drawing of gauge
if actor.limitbreak == LB_MAX
# Draw Silver Blue Bar
draw_slant_bar(x + plus_x + width * rate_x / 100, y + plus_y, lb, width,
width, height, od_color1 = Color.new(0,80,200,192),
od_color2 = Color.new(255,255,255,192))
else
# Draw Green Bar
draw_slant_bar(x + plus_x + width * rate_x / 100, y + plus_y, lb, width,
width, height, od_color1 = Color.new(31, 128, 0, 128),
od_color2 = Color.new(255, 255, 191))
end
self.contents.font.color = system_color
self.contents.font.size = 16
self.contents.draw_text(x - 25, y, 48, 32, "SCS")
end
end