scriptenv?

This commit is contained in:
MihailRis
2024-04-21 15:41:47 +03:00
parent d213902648
commit 635e512142
26 changed files with 128 additions and 158 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ void menus::create_menus(Engine* engine) {
auto file = engine->getResPaths()->find("layouts/pages/"+name+".xml");
auto fullname = "core:pages/"+name;
auto document = UiDocument::read(0, fullname, file).release();
auto document = UiDocument::read(scripting::get_root_environment(), fullname, file).release();
engine->getAssets()->store(document, fullname);
scripting::on_ui_open(document, nullptr, glm::ivec3());
return document->getRoot();