mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 05:51: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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue