Skip to content
Snippets Groups Projects
Commit eaf69f01 authored by dg's avatar dg
Browse files

even more progressbars ! yay me!

git-svn-id: http://svn.net-core.org/repos/t-engine4@4123 51575b47-30f0-44d4-a5cc-537603b46e54
parent 317544ce
No related branches found
No related tags found
No related merge requests found
......@@ -106,6 +106,7 @@ function _M:saveObject(obj, zip)
tbl:save()
savefile_pipe.current_nb = savefile_pipe.current_nb + 1
processed = processed + 1
core.wait.manualTick(1)
if self.coroutine then coroutine.yield() end
end
......@@ -500,7 +501,14 @@ function _M:loadLevel(zone, level)
fs.mount(path, self.load_dir)
local popup = Dialog:simpleWaiter("Loading level", "Please wait while loading the level...")
local f = fs.open(self.load_dir.."nb", "r")
local nb = 0
if f then
nb = tonumber(f:read()) or 100
f:close()
end
local popup = Dialog:simpleWaiter("Loading level", "Please wait while loading the level...", nil, nil, nb > 0 and nb)
core.display.forceRedraw()
local loadedLevel = self:loadReal("main")
......@@ -524,7 +532,14 @@ function _M:loadEntity(name)
fs.mount(path, self.load_dir)
local popup = Dialog:simpleWaiter("Loading entity", "Please wait while loading the entity...")
local f = fs.open(self.load_dir.."nb", "r")
local nb = 0
if f then
nb = tonumber(f:read()) or 100
f:close()
end
local popup = Dialog:simpleWaiter("Loading entity", "Please wait while loading the entity...", nil, nil, nb > 0 and nb)
core.display.forceRedraw()
local loadedEntity = self:loadReal("main")
......
......@@ -125,7 +125,7 @@ end
function _M:forceWait()
if #self.pipe == 0 then return end
local popup = Dialog:simpleWaiter("Saving...", "Please wait while saving...", nil, 1000)
local popup = Dialog:simpleWaiter("Saving...", "Please wait while saving...", nil, 1000, self.total_nb)
core.display.forceRedraw()
local cnt = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment