赞 | 0 |
VIP | 24 |
好人卡 | 8 |
积分 | 1 |
经验 | 11412 |
最后登录 | 2017-8-21 |
在线时间 | 416 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 416 小时
- 注册时间
- 2006-10-21
- 帖子
- 1245
|
- class RPG::BaseItem
- def word_color
- self.note.split(/[\r\n]+/).each { |line|
- if line =~ /\[word color H (\d+), (\d+), (\d+)\]/i
- return Color.new($1.to_i, $2.to_i, $3.to_i)
- elsif line =~ /\[word color (\d+)\]/i
- x = 64 + ($1.to_i % 8) * 8
- y = 96 + ($1.to_i / 8) * 8
- return Cache.system("Window").get_pixel(x, y)
- end}
- return Color.new(255, 255, 255)
- end
- end
- class Window_Base < Window
- def draw_item_name(item, x, y, enabled = true)
- if item != nil
- draw_icon(item.icon_index, x, y, enabled)
- self.contents.font.color = item.word_color
- self.contents.font.color.alpha = enabled ? 255 : 128
- self.contents.draw_text(x + 24, y, 172, WLH, item.name)
- end
- end
- end
复制代码 [word color 21] 注释 序号对应windows.png的颜色图块 0开始
http://ytomy.sakura.ne.jp/tkool/ ... mp;tech=enemy_guide
同最新版文字颜色方面无冲突 |
评分
-
查看全部评分
|