Project1
标题:
我想自己制作一个过渡窗口,可是过渡条不会增长.
[打印本页]
作者:
纳尔德
时间:
2011-7-12 21:54
标题:
我想自己制作一个过渡窗口,可是过渡条不会增长.
class Window_loading < Window_Base
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize
super(50,400, 515, 70)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 0
self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.name = ["宋体"]
self.contents.font.size = 18
self.contents.font.color = Color.new(255, 255, 255, 255)
self.contents.draw_text(350, -10 ,150,70, "正在加载中...")
self.contents.fill_rect(0,2,500,10,Color.new(255,255,255,255))
self.contents.fill_rect(0,3,496,8,Color.new(0,0,0,255))
self.contents.fill_rect(0,4,1 ,6,Color.new(-255,255,-255,255))
end
end
复制代码
RT,就是怎么样才能让过渡条宽度一点一点的增加?然后满后就过度完成. dsu_plus_rewardpost_czw
作者:
「旅」
时间:
2011-7-12 22:00
class Window_loading < Window_Base
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize
super(50,400, 515, 70)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 0
self.opacity = 0
@count = 0
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.name = ["宋体"]
self.contents.font.size = 18
self.contents.font.color = Color.new(255, 255, 255, 255)
self.contents.draw_text(350, -10 ,150,70, "正在加载中...")
self.contents.fill_rect(0,2,500,10,Color.new(255,255,255,255))
self.contents.fill_rect(0,3,496,8,Color.new(0,0,0,255))
self.contents.fill_rect(0,4,1 ,6,Color.new(-255,255,-255,255))
end
def update
self.contents.fill_rect(5*@count,4,5 ,6,Color.new(-255,255,-255,255))
@count += 1
end
end
复制代码
@count这个变量就想当一个"进度"~然后在update(中文:更新)里5*@count就可以一点点加了~
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1