赞 | 0 |
VIP | 0 |
好人卡 | 2 |
积分 | 2 |
经验 | 2541 |
最后登录 | 2023-7-22 |
在线时间 | 173 小时 |
Lv1.梦旅人 天空之神
- 梦石
- 0
- 星屑
- 156
- 在线时间
- 173 小时
- 注册时间
- 2009-5-3
- 帖子
- 612
|
- #==============================================================================
- # 本脚本来自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
复制代码 |
评分
-
查看全部评分
|