xml: image element

This commit is contained in:
MihailRis
2024-02-12 22:54:09 +03:00
parent 2de5f5c646
commit de6a6dd771
11 changed files with 101 additions and 71 deletions
+2 -2
View File
@@ -51,12 +51,12 @@ void UiDocument::collect(uinodes_map& map, std::shared_ptr<gui::UINode> node) {
}
}
std::unique_ptr<UiDocument> UiDocument::read(int penv, std::string namesp, fs::path file) {
std::unique_ptr<UiDocument> UiDocument::read(AssetsLoader& loader, int penv, std::string namesp, fs::path file) {
const std::string text = files::read_string(file);
auto xmldoc = xml::parse(file.u8string(), text);
auto env = scripting::create_environment(penv);
gui::UiXmlReader reader(*env);
gui::UiXmlReader reader(*env, loader);
InventoryView::createReaders(reader);
auto view = reader.readXML(
file.u8string(), xmldoc->getRoot()