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

Project1

 找回密码
 注册会员
搜索
查看: 2496|回复: 4
打印 上一主题 下一主题

[已经解决] 如何更改 hp、mp、tp 值槽的颜色?

[复制链接]

Lv5.捕梦者

梦石
10
星屑
39475
在线时间
1916 小时
注册时间
2010-11-14
帖子
3319

R考场第七期纪念奖

1
发表于 2019-9-21 22:47:59 | 显示全部楼层


RUBY 代码复制
  1. class Window_Base
  2.   #--------------------------------------------------------------------------
  3.   # ● 获取各种文字颜色
  4.   #--------------------------------------------------------------------------
  5.   def hp_gauge_color1;   text_color(20);  end;    # HP 值槽 1
  6.   def hp_gauge_color2;   text_color(21);  end;    # HP 值槽 2
  7.   def mp_gauge_color1;   text_color(22);  end;    # MP 值槽 1
  8.   def mp_gauge_color2;   text_color(23);  end;    # MP 值槽 2
  9.   def tp_gauge_color1;   text_color(28);  end;    # TP 值槽 1
  10.   def tp_gauge_color2;   text_color(29);  end;    # TP 值槽 2
  11. end


在下面找个空档插入这段,自己把里面的text_color改成需要的颜色
写法是Color.new(红, 绿, 蓝, 透明度),自己根据需要填写各个颜色的数值,0~255
透明度一般都是255所以不用写,以你需要紫色为例:
Color.new(255, 0, 255)
用头画头像,用脚写脚本
回复

使用道具 举报

Lv5.捕梦者

梦石
10
星屑
39475
在线时间
1916 小时
注册时间
2010-11-14
帖子
3319

R考场第七期纪念奖

2
发表于 2019-9-22 11:58:56 | 显示全部楼层
真の玛娜君 发表于 2019-9-21 23:05
好像直接改()里的数字也可以?

你改变数字的话,只能用窗口皮肤里定好的那些颜色。
如果要根据自己喜好来定的话,还是用Color.new(r,g,b,a)

用头画头像,用脚写脚本
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-14 08:35

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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