mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
added node:destruct()
This commit is contained in:
parent
b571179c8a
commit
c59973505e
3 changed files with 30 additions and 4 deletions
|
|
@ -127,6 +127,14 @@ void Container::remove(std::shared_ptr<UINode> selected) {
|
|||
refresh();
|
||||
}
|
||||
|
||||
void Container::remove(const std::string& id) {
|
||||
for (auto& node : nodes) {
|
||||
if (node->getId() == id) {
|
||||
return remove(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Container::clear() {
|
||||
for (auto node : nodes) {
|
||||
node->setParent(nullptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue