| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 6 |
| 经验 | |
| 最后登录 | 2017-5-7 |
| 在线时间 | 10 小时 |
龙骑
- 梦石
- 0
- 星屑
- 615
- 在线时间
- 10 小时
- 注册时间
- 2007-12-31
- 回帖
- 1932
|
发表于 2008-8-1 00:20:37
|
显示全部楼层
self.contents.font.color = Color.new(颜色代码)
Window_Base的这一段是帮助文档中的颜色:(看帮助文档-事件-文章的显示就行了)
def text_color(n)
case n
when 0
return Color.new(255, 255, 255, 255)
when 1
return Color.new(128, 128, 255, 255)
when 2
return Color.new(255, 128, 128, 255)
when 3
return Color.new(128, 255, 128, 255)
when 4
return Color.new(128, 255, 255, 255)
when 5
return Color.new(255, 128, 255, 255)
when 6
return Color.new(255, 255, 128, 255)
when 7
return Color.new(192, 192, 192, 255)
else
normal_color
end
end
颜色表:
所以,如果要显示2号颜色的话就改写成:
self.contents.font.color = Color.new(255, 128, 128, 255) |
|