SDLPP TextRenderer: add function

This commit is contained in:
zv0n 2022-07-24 20:22:07 +02:00
parent 70f30b6767
commit 6cee97059c
2 changed files with 4 additions and 0 deletions

View File

@ -161,4 +161,7 @@ void TextRenderer::saveFontConfig(
_config = std::move(config); _config = std::move(config);
text_change = true; text_change = true;
} }
std::string TextRenderer::getText() {
return _text;
}
} // namespace SDLPP } // namespace SDLPP

View File

@ -39,6 +39,7 @@ public:
virtual void render() override; virtual void render() override;
virtual void updateSizeAndPosition() override; virtual void updateSizeAndPosition() override;
virtual std::shared_ptr< RenderObject > copySelf() override; virtual std::shared_ptr< RenderObject > copySelf() override;
std::string getText();
private: private:
virtual void copyTo( std::shared_ptr< RenderObject > other ) override; virtual void copyTo( std::shared_ptr< RenderObject > other ) override;