查看: 3321|回复: 2

[已经解决] 怎样让主菜单的一些选项改变文字颜色。

[复制链接]
梦石
0
星屑
381
在线时间
238 小时
注册时间
2013-8-20
回帖
410
发表于 2018-2-25 10:14:20 | 显示全部楼层 |阅读模式
悬赏1星屑已解决
我想把物品跟技能的文字改为红色字表示,存档改为蓝色字表示。
请问怎么做到?
不定期回来6R玩。
↓下方广告帖,欢迎点击
梦石
0
星屑
898
在线时间
421 小时
注册时间
2015-7-5
回帖
126
发表于 2018-2-25 10:14:21 | 显示全部楼层
  1. class Window_Command < Window_Selectable
  2.   def draw_item(index,enabled = true)
  3.     rect = item_rect(index)
  4.     rect.x += 4
  5.     rect.width -= 8
  6.     self.contents.clear_rect(rect)
  7.     self.contents.font.color = normal_color
  8.     self.contents.font.color.alpha = enabled ? 255 : 128
  9.    
  10.     #以下3组“”内的文字要与你游戏设置的一致
  11.     case @commands[index]
  12.       when "存档"
  13.         self.contents.font.color = text_color(12)
  14.       when "物品","特技"
  15.         self.contents.font.color = text_color(10)
  16.     end
  17.     #=======================================
  18.    
  19.     self.contents.draw_text(rect, @commands[index])  
  20.   end
  21. end
复制代码

点评

谢谢帮助,我也了解了不错的方法  发表于 2018-2-25 20:25

评分

参与人数 2星屑 +70 赞 +1 收起 理由
正太君 + 70 认可答案
白魔导师宝儿 + 1 认可答案

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部