feat: add a new awesome feature

This commit is contained in:
Ysm-04
2025-09-30 19:26:01 +08:00
parent 741987e48b
commit 26f30cee39
3 changed files with 15 additions and 1 deletions

View File

@@ -140,6 +140,14 @@ void TextBox::setTextBoxBk(COLORREF color)
this->dirty = true;
}
void TextBox::setText(std::string text)
{
if(text.size() > maxCharLen)
text = text.substr(0, maxCharLen);
this->text = text;
this->dirty = true;
}
std::string TextBox::getText() const
{
return this->text;