move menu pages loader to Lua & add gui.load_document, file.ext(), file.prefix() & add core:gui_util module

This commit is contained in:
MihailRis
2025-01-06 16:07:16 +03:00
parent da471bd4eb
commit 0a1a16299e
16 changed files with 156 additions and 55 deletions
+9
View File
@@ -1,6 +1,8 @@
#pragma once
#include <filesystem>
#include <functional>
#include <memory>
#include <string>
#include "typedefs.hpp"
@@ -10,6 +12,11 @@ namespace fs = std::filesystem;
class Hud;
class WorldRenderer;
namespace gui {
class UINode;
using PageLoaderFunc = std::function<std::shared_ptr<UINode>(const std::string&)>;
}
namespace scripting {
extern Hud *hud;
extern WorldRenderer* renderer;
@@ -29,4 +36,6 @@ namespace scripting {
const fs::path& file,
const std::string& fileName
);
gui::PageLoaderFunc create_page_loader();
}