def dispose if !self.disposed? for i in @sprites i[1].dispose if i[1] @sprites[i[0]]=nil end for i in 0...@sidebitmaps.length @sidebitmaps[i].dispose if @sidebitmaps[i] @sidebitmaps[i]=nil end @blankcontents.dispose @cursorbitmap.dispose if @cursorbitmap @backbitmap.dispose if @backbitmap @sprites.clear @sidebitmaps.clear @_windowskin=nil @_windowskin_cursor=nil @_contents=nil @disposed=true end end

def viewport=(value) @viewport=value for i in @spritekeys @sprites[i].dispose if @sprites[i].is_a?(Sprite) @sprites[i]=Sprite.new(@viewport) elsif @sprites[i].is_a?(Plane) @sprites[i]=Plane.new(@viewport) else @sprites[i]=nil end end privRefresh(true) end