#==============================================================================
#
# My first RGSS Script. Hopefully, this works out well
#
# This is a standard bestiary script. It displays a list of enemies that
# you've encountered and their image and stats.
#
# Author: AceTheMad
#==============================================================================
class Window_Monster_Image < Window_Base
#-----------------------------------------------------------------------------
# * Object Initialization
#-----------------------------------------------------------------------------
def initialize
super(220, 0, 420, 240)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = MBook::TEXT_SIZE
self.contents.draw_text(30, 30, contents.text_size(MBook::TEXT).width, MBook::TEXT_SIZE + 12, MBook::TEXT)
end
end
class Monster_List < Window_Selectable
def initialize
super(0, 0, 220, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@item_max = $data_enemies.compact.length
@column_max = 1
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i)
end
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
#--------------------------------------------------------------------------
def draw_item(index)
y = 4 + index * 32
self.contents.draw_text(0, y, 220, 32, $data_enemies.compact[index].name)
end
end