<ICON Dateiname>
class Window_Base def draw_icon2(icon_file, x, y, enabled = true) bitmap = Cache.load_bitmap("Graphics/Icons/", icon_file) rect = Rect.new(0, 0, 24, 24) self.contents.blt(x, y, bitmap, rect, enabled ? 255 : 128) end def draw_item_name(item, x, y, enabled = true) if item != nil if item.get_icon draw_icon2(item.get_icon.to_s, x, y, enabled) else draw_icon(item.icon_index, x, y, enabled) end self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(x + 24, y, 172, WLH, item.name) end endendmodule Item ICON = /<ICON*(.*)>/iendclass RPG::BaseItem def get_icon self.note.split(/[\r\n]+/).each { |line| if line =~ Item::ICON a = line.split(/ /)[1] d = "" while ((c = a.slice!(/./m)) != nil) d += c if c != ">" end return d end } return nil endend