#==============================================================================
# ** Bitmap
#------------------------------------------------------------------------------
# The bitmap class. Bitmaps are expressions of so-called graphics.
# Sprites and other objects must be used to display bitmaps on the screen.
#==============================================================================
class Bitmap
#--------------------------------------------------------------------------
# * Draw Skill Window Icon
# classes : classes
# id : class ID
#--------------------------------------------------------------------------
def draw_skill_window_icon(classes, id)
bitmap = Bitmap.new(64, 64)
rect = Rect.new(0, 0, 64, 64)
bitmap.blt(0, 0, RPG::Cache.picture(classes[id]), rect)
self.blt(93, 82 + 128*id, bitmap, rect)
end
#--------------------------------------------------------------------------
# * Draw Skill Window Item
# skills : skills
# actor_skills : skills
# i : class ID
# j : skill ID
# page : page
# item_max : item max
#--------------------------------------------------------------------------
def draw_skill_window_item(skills, actor_skills, i, j, page, item_max)
index = skills.index(actor_skills[i][j])
x, y = 190, 114 + (index - page * item_max) * 32
name = BOARD_ITEM(8, actor_skills[i][j]).name
self.draw_outline(x, y, 130, 32, name)
end
#--------------------------------------------------------------------------
# * Draw Outline
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# w : draw spot width
# h : draw spot height
# text : text string displayed
# align : alignment (0..flush left, 1..center, 2..flush right)
# color : text string color
#--------------------------------------------------------------------------
def draw_outline(x, y, w, h, text, align=0, color=Color.new(255, 255, 255))
self.font.color = Color.new(0, 0, 0)
self.draw_text(x, y + 1, w, h, text, align) # U
self.draw_text(x - 1, y + 1, w, h, text, align) # UL
self.draw_text(x - 1, y, w, h, text, align) # L
self.draw_text(x - 1, y - 1, w, h, text, align) # DL
self.draw_text(x, y - 1, w, h, text, align) # D
self.draw_text(x + 1, y - 1, w, h, text, align) # DR
self.draw_text(x + 1, y, w, h, text, align) # R
self.draw_text(x + 1, y + 1, w, h, text, align) # UR
self.font.color = color
self.draw_text(x, y, w, h, text, align)
end
end