VN System improved.

This commit is contained in:
2022-11-19 13:42:04 -08:00
parent 1e8dfa7388
commit 4eeecced2f
28 changed files with 577 additions and 154 deletions

View File

@ -57,6 +57,17 @@ namespace Dawn {
this->children.push_back(item);
return item;
}
template<class T>
T * findElement() {
auto it = this->children.begin();
while(it != this->children.end()) {
auto castedAs = dynamic_cast<T*>(*it);
if(castedAs != nullptr) return castedAs;
++it;
}
return nullptr;
}
/**
* Returns the width of the root UI Canvas size. In future I may allow