赞 | 0 |
VIP | 2 |
好人卡 | 0 |
积分 | 2 |
经验 | 6516 |
最后登录 | 2025-7-28 |
在线时间 | 82 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 222
- 在线时间
- 82 小时
- 注册时间
- 2007-6-26
- 帖子
- 262
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
脚本..1O78行发生ArigumentError.
comparison of Fixnum with nil failed
1078行以下我都弄出来了
- now = now > max ? max : now
- percentage = max != 0 ? (width-2) * now / max.to_f : 0
- if start_color == end_color
- self.contents.fill_rect(x+1, y+1, percentage, height-2, start_color)
- else
- for i in 1..percentage
- r = start_color.red + (end_color.red - start_color.red) / percentage * i
- g = start_color.green + (end_color.green - start_color.green) / percentage * i
- b = start_color.blue + (end_color.blue - start_color.blue) / percentage * i
- a = start_color.alpha + (end_color.alpha - start_color.alpha) / percentage * i
- self.contents.fill_rect(x+i, y+1, 1, height-2, Color.new(r, g, b, a))
- end
- end
- end
- end
复制代码 |
|