Trying ttf loading
This commit is contained in:
@@ -14,6 +14,15 @@ Element::~Element()
|
||||
{
|
||||
}
|
||||
|
||||
void Element::setParent(PElement element)
|
||||
{
|
||||
if(parent != nullptr)
|
||||
{
|
||||
parent->removeChild(this);
|
||||
}
|
||||
parent = element;
|
||||
}
|
||||
|
||||
PElement Element::getParent() const
|
||||
{
|
||||
return parent;
|
||||
@@ -24,6 +33,11 @@ void Element::addChild(PElement element)
|
||||
children.add(element);
|
||||
}
|
||||
|
||||
void Element::removeChild(PElement element)
|
||||
{
|
||||
children.remove(element, false);
|
||||
}
|
||||
|
||||
const Array<PElement> Element::getChildren()
|
||||
{
|
||||
return children;
|
||||
@@ -34,11 +48,6 @@ void Element::clear()
|
||||
children.clear();
|
||||
}
|
||||
|
||||
void Element::remove(PElement element)
|
||||
{
|
||||
children.remove(children.find(element));
|
||||
}
|
||||
|
||||
void Element::setEnabled(bool newEnabled)
|
||||
{
|
||||
enabled = newEnabled;
|
||||
|
||||
Reference in New Issue
Block a user