SDLPP LineRenderer: actually copy in copySelf
This commit is contained in:
parent
d4f3e07ae4
commit
27949f891a
@ -111,9 +111,12 @@ void LineRenderer::centerX() {
|
||||
updateSizeAndPosition();
|
||||
}
|
||||
std::shared_ptr< RenderObject > LineRenderer::copySelf() {
|
||||
// TODO ACTUALLY copy, don't just copy pointers to textures and whatnot,
|
||||
// create new textures!!!
|
||||
return std::make_shared< LineRenderer >( *this );
|
||||
auto ret = std::make_shared< LineRenderer >( *this );
|
||||
copyTo(ret);
|
||||
return ret;
|
||||
}
|
||||
void LineRenderer::copyTo(std::shared_ptr<RenderObject> other) {
|
||||
RenderObject::copyTo(other);
|
||||
}
|
||||
|
||||
SDL_Rect LineRenderer::getRect() {
|
||||
|
@ -41,6 +41,7 @@ public:
|
||||
void setOutlineColor( const std::string & /*UNUSED*/ ) override {}
|
||||
|
||||
protected:
|
||||
virtual void copyTo(std::shared_ptr<RenderObject> other) override;
|
||||
void updateXY();
|
||||
double og_x1;
|
||||
double og_y1;
|
||||
|
Loading…
Reference in New Issue
Block a user