class Ladebildschirm < Window_Base
def main
end
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
self.contents.font.size = 15
self.contents.font.name = "Northwood High"
@msk_lay = Sprite.new
@msk_lay.bitmap = RPG::Cache.picture("ladenback")
@msk_lay.z = 0
@balken_leer = Sprite.new
@balken_leer.bitmap = RPG::Cache.picture("ladenleer")
@balken_leer.z = 10
@balken_leer.x = 228
@balken_leer.y = 207
@text = 0
refresh
end
def refresh
loop do
loop {
i = 0 if i.nil?
@text += 1
self.contents.clear
self.contents.draw_text(390, 160, 440, 32, @text.to_s + "%")
i += 1
break if i == 50
Graphics.update
}
if @text == 100
break
end
end
end
def Graphics.update
# @bitmap2 = RPG::Cache.picture("ladenvoll")
# ch = @bitmap2.height
# cw = @bitmap2.width * @text / 100
# src_rect = Rect.new(0, 0, cw, ch)
# self.contents.blt(228, 207, @bitmap2, src_rect)
end
end