VN System improved.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user