Project1

标题: 我想自己制作一个过渡窗口,可是过渡条不会增长. [打印本页]

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




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1