| 
 
| 赞 | 4 |  
| VIP | 71 |  
| 好人卡 | 22 |  
| 积分 | 7 |  
| 经验 | 32145 |  
| 最后登录 | 2013-8-9 |  
| 在线时间 | 184 小时 |  
 Lv2.观梦者 天仙 
	梦石0 星屑680 在线时间184 小时注册时间2008-4-15帖子5023 
 | 
| 
本帖最后由 雪流星 于 2012-2-13 10:36 编辑
x
加入我们,或者,欢迎回来。您需要 登录 才可以下载或查看,没有帐号?注册会员  
 新版: http://rpg.blue/thread-222506-1-1.html
 
 用PS改IconSet改到快疯掉之後写的作品
 之接让VX支援单张图标档算了
 
 在Graphic文件夹新增一个叫做「Icons」的文件夹
 把要用的图标放在里面
 
 在物品、技能的备注里面写
 <ICON 图标文件名>
 就能调用该图标了
 没有写的调用在数据库设置的图标
 
 只支援默认24X24的图标,要大图标的话请自己修改窗口等
 复制代码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
  end
end
module Item
  ICON = /<ICON (.*)>/i
end
class RPG::BaseItem
  def get_icon
    self.note.split(/[\r\n]+/).each { |line|
      return $1 if line =~ Item::ICON
    }
    return nil
  end
end
 | 
 |