diff options
author | ancarola <raffaele.ancarola@epfl.ch> | 2019-01-21 23:55:52 +0100 |
---|---|---|
committer | ancarola <raffaele.ancarola@epfl.ch> | 2019-01-21 23:55:52 +0100 |
commit | a4df955c227efe409976a82e4f9ecb073319557a (patch) | |
tree | 0036a91a3b48f1aca53586c6f3eed4f7c0b311b9 /engine/flatcomponent.cpp | |
parent | Test 3 partially executed (diff) | |
download | flatland-a4df955c227efe409976a82e4f9ecb073319557a.tar.gz flatland-a4df955c227efe409976a82e4f9ecb073319557a.zip |
Flat removed
Diffstat (limited to 'engine/flatcomponent.cpp')
-rw-r--r-- | engine/flatcomponent.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/engine/flatcomponent.cpp b/engine/flatcomponent.cpp new file mode 100644 index 0000000..16969ff --- /dev/null +++ b/engine/flatcomponent.cpp @@ -0,0 +1,36 @@ +#include "flatcomponent.h" +#include "flatsignal.h" + +Component::Component(Component *parent, const std::string& id) + : parent(parent) +{ + // TODO, check flatland initialization + + if (id.empty()) + setID(FlatObject::randomID()); + + if (parent == 0) + { + // TODO set screen as parent layer + } +} + +Component~Component() +{ + +} + +void Component::setParent(Component *parent) +{ + if (parent == 0) + // TODO set screen as parent layer + ; + + this->parent = parent; +} + +Component * getParent() +{ + return parent; +} + |