| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 23 |
| 经验 | |
| 最后登录 | 2026-8-17 |
| 在线时间 | 610 小时 |
- 梦石
- 0
- 星屑
- 2294
- 在线时间
- 610 小时
- 注册时间
- 2016-4-10
- 回帖
- 24
|
楼主 |
发表于 2017-6-17 14:33:41
|
显示全部楼层
自己摸索了下 原来是我自己用语错误,这里应该这样改- #==============================================================================
- # ■ Window_Base
- #==============================================================================
- 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 = text_color(item.text_color.to_i)
-
- if item.is_a?(RPG::Weapon)
- self.contents.font.color = text_color(item.text_color.to_i)
- end
-
- if item.is_a?(RPG::Armor)
- self.contents.font.color = text_color(item.text_color.to_i)
- end
- if item.is_a?(RPG::Item)
- case item.id
- when 1#该数字为物品ID
- self.contents.font.color = text_color(24)
- when 3
- self.contents.font.color = text_color(30)
- when 4,15,19,36,81,172
- self.contents.font.color = text_color(24)
- when 5,29,6,38,7,2,107,152..154,174
- self.contents.font.color = text_color(6)
- when 8..14,16,18,20,39,42,108,122,123,159,175
- self.contents.font.color = text_color(30)
- when 21,23..28,40,44,45,53,55..64,80,102,103,109,176,201..210
- self.contents.font.color = text_color(27)
- when 22,31,35,161
- self.contents.font.color = text_color(0)
- when 30,48..51,105,110,113..115,125..137,162,165
- self.contents.font.color = text_color(17)
- when 33,37,101,106,158,173
- self.contents.font.color = text_color(1)
- when 41,111,112
- self.contents.font.color = text_color(18)
- when 71..77,104,160,177
- self.contents.font.color = text_color(2)
- end
- end
- self.contents.font.color.alpha = enabled ? 255 : 128
- self.contents.draw_text(x + 24, y, 172, WLH, item.name)
- end
- end
- end
复制代码 请版主帮忙结帖 |
|