| 赞 | 91 |
| VIP | |
| 好人卡 | |
| 积分 | 105 |
| 经验 | |
| 最后登录 | 2024-6-24 |
| 在线时间 | 5019 小时 |
无限の剣制
- 梦石
- 0
- 星屑
- 10450
- 在线时间
- 5019 小时
- 注册时间
- 2013-2-28
- 回帖
- 4942
 
|
发表于 2014-11-13 22:22:12
|
显示全部楼层
本帖最后由 VIPArcher 于 2014-11-13 22:29 编辑
https://rpg.blue/thread-371989-1-1.html
以前给你弄的这个,稍微改一改。
[pre lang="ruby" line="1"]class RPG::BaseItem
#--------------------------------------------------------------------------
# ● 获取图标
#--------------------------------------------------------------------------
def get_icon
self.note.split(/[\r\n]+/).each { |line|
return $1 if line =~ /<ICON:(\S+)>/i
}
return nil
end
#--------------------------------------------------------------------------
# ● 图标 index
#--------------------------------------------------------------------------
alias vip_20140928_icon_index icon_index
def icon_index
return get_icon if get_icon
return vip_20140928_icon_index
end
end
class Window_Base
#--------------------------------------------------------------------------
# ● 绘制图标
#--------------------------------------------------------------------------
alias vip_20140928_draw_icon draw_icon
def draw_icon(icon_index, x, y, enabled = true)
if icon_index.is_a?(Integer)
vip_20140928_draw_icon(icon_index, x, y, enabled)
else
bitmap = Cache.load_bitmap("Graphics/Icons/", icon_index)
rect = Rect.new(0, 0, bitmap.width, bitmap.height)
contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
end
end
end
[/pre]
你就可以用大图标了,当然前提是绘制图标的地方需要足够大。 |
评分
-
查看全部评分
|