SDLPP: make copySelf actually copy everything
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user