add test.close_world(bool)

This commit is contained in:
MihailRis
2024-12-10 19:14:51 +03:00
parent 9b4dd8f65e
commit d3f74b56fa
8 changed files with 30 additions and 11 deletions
+6 -2
View File
@@ -18,8 +18,6 @@
#include "frontend/locale.hpp"
#include "frontend/menu.hpp"
#include "frontend/screens/Screen.hpp"
#include "frontend/screens/MenuScreen.hpp"
#include "frontend/screens/LevelScreen.hpp"
#include "graphics/render/ModelsGenerator.hpp"
#include "graphics/core/DrawContext.hpp"
#include "graphics/core/ImageData.hpp"
@@ -454,9 +452,15 @@ void Engine::setLanguage(std::string locale) {
}
void Engine::onWorldOpen(std::unique_ptr<Level> level) {
logger.info() << "world open";
levelConsumer(std::move(level));
}
void Engine::onWorldClosed() {
logger.info() << "world closed";
levelConsumer(nullptr);
}
gui::GUI* Engine::getGUI() {
return gui.get();
}