diff --git a/mplot/TxtVisual.cppm b/mplot/TxtVisual.cppm index c3276967..ffbfb13b 100644 --- a/mplot/TxtVisual.cppm +++ b/mplot/TxtVisual.cppm @@ -36,6 +36,12 @@ export namespace mplot this->addLabel (this->text, sm::vec{}, this->tf); } + void update (const std::string& newtext) + { + this->text = newtext; + this->reinit_with_clearTexts(); + } + std::string text; mplot::TextFeatures tf; };