Â
class Window_Bio < Window_Base
 attr_accessor :name
 attr_accessor :class
 attr_accessor :gender
 attr_accessor :age
 attr_accessor :height
 attr_accessor :weight
Â
 def initialize(actor)
  super(0, 0, 640, 480)
  self.contents = Bitmap.new(width - 32, height - 32)
  @actor = $game_party.actors[actor]
  @id = @actor.id
  @name = @actor.name.to_s
  @class = @actor.class_name.to_s
  @gender = ["1", "2", "3", "4"]
  @age = ["1", "2", "3", "4"]
  @height = ["1", "2", "3", "4"]
  @weight = ["1", "2", "3", "4"]
  refresh
  self.visible = true
 end
Â
 def refresh
  self.contents.clear
  draw_graphic(@actor)
  draw_name
  draw_class
  draw_gender(@id)
  draw_age(@id)
  draw_height(@id)
  draw_weight(@id)
  self.contents.font.color = system_color
  self.contents.draw_text(100, 50, 100, 32, "Class: ", 2)
  self.contents.draw_text(100, 114, 100, 32, "Gender: ", 2)
  self.contents.draw_text(100, 145, 100, 32, "Age: ", 2)
  self.contents.draw_text(300, 50, 100, 32, "Height: ", 2)
  self.contents.draw_text(300, 82, 100, 32, "Weight: ", 2)
  return
 end
Â
 def draw_name
  self.contents.font.size = 48
  self.contents.draw_text(0, 0, 608, 50, @name, 1)
 end
Â
 def draw_graphic(actor)
  bitmap = Bitmap.new('Graphics/Pictures/' + actor.name)
  rect = Rect.new(2, 0, 100, 100)
  self.contents.blt(0, 50, bitmap, rect)
 end
 Â
 def draw_class
  self.contents.draw_text(200, 82, 100, 32, @class)
 end
Â
 def draw_gender(actor)
  self.contents.draw_text(200, 114, 100, 32, @gender[actor])
 end
Â
 def draw_age(actor)
  self.contents.draw_text(200, 146, 100, 32, age[actor])
 end
Â
 def draw_height(actor)
  self.contents.draw_text(400, 50, 100, 32, height[actor])
 end
Â
 def draw_weight(actor)
  self.contents.draw_text(400, 82, 100, 32, weight[actor])
 end
end
Â