UiDocument

This commit is contained in:
MihailRis
2024-02-07 19:29:20 +03:00
parent c902ed506b
commit 1dd0e9f939
17 changed files with 257 additions and 42 deletions
+3 -2
View File
@@ -344,11 +344,12 @@ std::shared_ptr<InventoryView> InventoryView::readXML(
LevelFrontend* frontend,
InventoryInteraction& interaction,
const std::string& src,
const std::string& file
const std::string& file,
const scripting::Environment& env
) {
auto view = std::make_shared<InventoryView>(frontend, interaction);
gui::UiXmlReader reader;
gui::UiXmlReader reader(env);
reader.add("inventory", [=](gui::UiXmlReader& reader, xml::xmlelement element) {
reader.readUINode(reader, element, *view);
return view;