Project1
标题:
怎样让主菜单的一些选项改变文字颜色。
[打印本页]
作者:
白魔导师宝儿
时间:
2018-2-25 10:14
标题:
怎样让主菜单的一些选项改变文字颜色。
我想把物品跟技能的文字改为红色字表示,存档改为蓝色字表示。
请问怎么做到?
作者:
梦无笙
时间:
2018-2-25 10:14
class Window_Command < Window_Selectable
def draw_item(index,enabled = true)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
#以下3组“”内的文字要与你游戏设置的一致
case @commands[index]
when "存档"
self.contents.font.color = text_color(12)
when "物品","特技"
self.contents.font.color = text_color(10)
end
#=======================================
self.contents.draw_text(rect, @commands[index])
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1