赞 | 0 |
VIP | 1 |
好人卡 | 13 |
积分 | 2 |
经验 | 11535 |
最后登录 | 2016-11-28 |
在线时间 | 691 小时 |
Lv1.梦旅人 水土火风重逢处
- 梦石
- 0
- 星屑
- 234
- 在线时间
- 691 小时
- 注册时间
- 2010-7-17
- 帖子
- 3042
|
我纯引小鱼子的- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- 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(/[ ]+/).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
- end
- end
- class RPG::BaseSkill
- def get_icon
- self.note.split(/[ ]+/).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
- end
- end
复制代码 |
评分
-
查看全部评分
|