class Window_Base < Window
#--------------------------------------------------------------------------
# * Make State Text String for Drawing
# actor : actor
# width : draw spot width
# need_normal : Whether or not [normal] is needed (true / false)
#--------------------------------------------------------------------------
def make_battler_state_text(battler, width, need_normal)
# Make text string for state names
text = []
for states in battler.states
unless $data_states[states].rating == 0
next if states == nil
text << $data_states[states].name
end
end
# Return completed text string
state_text = text.size == 0 ? "" : text
return state_text
end
#--------------------------------------------------------------------------
# * Draw State
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
def draw_actor_state(actor, x, y, width = 120)
text = make_battler_state_text(actor, width, true)
self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
for i in text
self.contents.blt(x + text.index(i) * 32, y, RPG::Cache.icon(i), Rect.new(0, 0, 32, 32))
end
end
end