查看: 3344|回复: 2

[已经解决] 请问截图中那个红底的窗口背景的实现方法

[复制链接]
梦石
0
星屑
208
在线时间
420 小时
注册时间
2020-1-11
回帖
175
发表于 2020-10-23 14:47:24 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 alianlord 于 2020-10-23 14:50 编辑

我用过窗口的tone属性,但是红色背景一闪就不见了
梦石
0
星屑
29901
在线时间
5734 小时
注册时间
2016-3-8
回帖
1653
发表于 2020-10-23 17:27:44 | 显示全部楼层
本帖最后由 alexncf125 于 2020-10-23 17:38 编辑

xxxxxxxxxx.fill_rect(x, y, width, height, color)

比如:
class Window_Gold < Window_Base
  def refresh
    contents.clear
    color = text_color(18)
    color.alpha = 100
    contents.fill_rect(0, 0, window_width, fitting_height(1), color)
    draw_currency_value(value, currency_unit, 4, 0, contents.width - 8)
  end
end

效果:
未命名.png

然而我也不知道如何应用在选项上~~
回复 1 0

使用道具 举报

梦石
0
星屑
208
在线时间
420 小时
注册时间
2020-1-11
回帖
175
 楼主| 发表于 2020-10-23 18:07:29 | 显示全部楼层
alexncf125 发表于 2020-10-23 17:27
xxxxxxxxxx.fill_rect(x, y, width, height, color)

比如:

多谢指导。现在我有思路了。
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部