]> git.localhorst.tv Git - blank.git/blobdiff - src/standalone/UnloadState.cpp
remove commented code left from collision change
[blank.git] / src / standalone / UnloadState.cpp
index db1d2a5ec57d1a3c86f4b29a23e2f7391f34530c..0b48904935e5e8a660547c8acc1d3f506e998c2c 100644 (file)
@@ -12,17 +12,16 @@ UnloadState::UnloadState(
        Environment &env,
        ChunkStore &chunks,
        const WorldSave &save)
-: env(env)
+: ProgressState(env, "Unloading chunks: %d/%d (%d%%)")
+, env(env)
 , chunks(chunks)
 , save(save)
-, progress(env.assets.large_ui_font)
 , cur(chunks.begin())
 , end(chunks.end())
 , done(0)
 , total(chunks.NumLoaded())
 , per_update(64) {
-       progress.Position(glm::vec3(0.0f), Gravity::CENTER);
-       progress.Template("Unloading chunks: %d/%d (%d%%)");
+
 }
 
 
@@ -45,15 +44,11 @@ void UnloadState::Update(int dt) {
                }
        }
        if (cur == end) {
-               env.state.PopAll();
+               env.state.Pop();
        } else {
-               progress.Update(done, total);
+               SetProgress(done, total);
        }
 }
 
-void UnloadState::Render(Viewport &viewport) {
-       progress.Render(viewport);
-}
-
 }
 }