added node:destruct()
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace gui {
|
||||
virtual void add(std::shared_ptr<UINode> node, glm::vec2 pos);
|
||||
virtual void clear();
|
||||
virtual void remove(std::shared_ptr<UINode> node);
|
||||
virtual void remove(const std::string& id);
|
||||
virtual void scrolled(int value) override;
|
||||
virtual void setScrollable(bool flag);
|
||||
void listenInterval(float interval, ontimeout callback, int repeat=-1);
|
||||
|
||||
Reference in New Issue
Block a user