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