设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2268|回复: 2

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

[复制链接]

Lv2.观梦者

梦石
0
星屑
381
在线时间
238 小时
注册时间
2013-8-20
帖子
496
发表于 2018-2-25 10:14:20 | 显示全部楼层 |阅读模式
1星屑
我想把物品跟技能的文字改为红色字表示,存档改为蓝色字表示。
请问怎么做到?
不定期回来6R玩。
下方广告帖,欢迎点击

Lv2.观梦者

梦石
0
星屑
898
在线时间
421 小时
注册时间
2015-7-5
帖子
131
发表于 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 认可答案

查看全部评分

回复

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-3-29 18:41

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表