class Window_Base < Window
def draw_actor_battler(actor, x, y)
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width
ch = bitmap.height
rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x, y, bitmap, rect)
end
end
class Window_Status < Window_Base
def initialize(actor)
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@actor = actor
refresh
end
def refresh
self.contents.clear
draw_actor_battler(@actor, 224, 160)
draw_actor_name(@actor, 32, 0)
draw_actor_class(@actor, 192, 0)
draw_actor_level(@actor, 320, 0)
draw_actor_state(@actor, 480, 0)
draw_actor_hp(@actor, 4, 64, 172)
draw_actor_sp(@actor, 4, 96, 172)
draw_actor_parameter(@actor, 4, 160, 0)
draw_actor_parameter(@actor, 4, 192, 1)
draw_actor_parameter(@actor, 4, 224, 2)
draw_actor_parameter(@actor, 4, 288, 3)
draw_actor_parameter(@actor, 4, 320, 4)
draw_actor_parameter(@actor, 4, 352, 5)
draw_actor_parameter(@actor, 4, 384, 6)
self.contents.font.color = system_color
self.contents.draw_text(448, 64, 80, 32, "Exp:")
self.contents.draw_text(448, 96, 80, 32, "Next Level:")
self.contents.font.color = normal_color
self.contents.draw_text(448 + 72, 64, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(448 + 72, 96, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(448, 160, 96, 32, "Equipment:")
draw_item_name($data_weapons[@actor.weapon_id], 448, 192)
draw_item_name($data_armors[@actor.armor1_id], 448, 224)
draw_item_name($data_armors[@actor.armor2_id], 448, 256)
draw_item_name($data_armors[@actor.armor3_id], 448, 288)
draw_item_name($data_armors[@actor.armor4_id], 448, 320)
end
def dummy
self.contents.font.color = system_color
self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
draw_item_name($data_weapons[@actor.weapon_id], 448, 192)
draw_item_name($data_armors[@actor.armor1_id], 448, 224)
draw_item_name($data_armors[@actor.armor2_id], 448, 256)
draw_item_name($data_armors[@actor.armor3_id], 448, 288)
draw_item_name($data_armors[@actor.armor4_id], 448, 320)
end
end