fix ui elements overriding

This commit is contained in:
MihailRis
2025-12-08 19:21:49 +03:00
committed by ShiftyX1
parent 5ae34c2dc2
commit d7f3bf9c7c
4 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ std::shared_ptr<gui::UINode> UiDocument::get(const std::string& id) const {
if (found == map.end()) {
return nullptr;
}
return found->second;
return found->second.lock();
}
const uidocscript& UiDocument::getScript() const {
+1 -1
View File
@@ -19,7 +19,7 @@ struct uidocscript {
bool onclose : 1;
};
using UINodesMap = std::unordered_map<std::string, std::shared_ptr<gui::UINode>>;
using UINodesMap = std::unordered_map<std::string, std::weak_ptr<gui::UINode>>;
class UiDocument {
std::string id;