add on_screen_change project script event & fix UIDocument::rebuildIndices & move menu background to project script

This commit is contained in:
MihailRis
2025-08-07 22:14:52 +03:00
parent 7749da4a85
commit 0a02d3fbec
16 changed files with 148 additions and 66 deletions
+3 -1
View File
@@ -14,11 +14,13 @@ UiDocument::UiDocument(
const std::shared_ptr<gui::UINode>& root,
scriptenv env
) : id(std::move(id)), script(script), root(root), env(std::move(env)) {
gui::UINode::getIndices(root, map);
rebuildIndices();
}
void UiDocument::rebuildIndices() {
map.clear();
gui::UINode::getIndices(root, map);
map["root"] = root;
}
const UINodesMap& UiDocument::getMap() const {