SDLPP: make copySelf actually copy everything

This commit is contained in:
2020-12-18 16:02:02 +01:00
parent 67a56d31de
commit 20c30712b9
9 changed files with 36 additions and 3 deletions
+6 -3
View File
@@ -139,9 +139,12 @@ void RectangleRender::centerX() {
updateSizeAndPosition();
}
std::shared_ptr< RenderObject > RectangleRender::copySelf() {
// TODO ACTUALLY copy, don't just copy pointers to textures and whatnot,
// create new textures!!!
return std::make_shared< RectangleRender >( *this );
auto ret = std::make_shared< RectangleRender >( *this );
copyTo(ret);
return ret;
}
void RectangleRender::copyTo(std::shared_ptr<RenderObject> other) {
RenderObject::copyTo(other);
}
std::string RectangleRender::getColor() const {
return color;