Codechange: use Textbuf::GetText() to access the buffer / hide Textbuf::buf

This commit is contained in:
Rubidium
2025-01-16 20:44:29 +01:00
committed by rubidium42
parent 55fa14cb06
commit 4b2051a1c1
17 changed files with 43 additions and 43 deletions

View File

@@ -58,7 +58,7 @@ struct OskWindow : public Window {
this->querystrings[WID_OSK_TEXT] = this->qs;
/* make a copy in case we need to reset later */
this->orig_str = this->qs->text.buf;
this->orig_str = this->qs->text.GetText();
this->InitNested(0);
this->SetFocusedWidget(WID_OSK_TEXT);
@@ -157,7 +157,7 @@ struct OskWindow : public Window {
break;
case WID_OSK_OK:
if (!this->qs->orig.has_value() || this->qs->text.buf != this->qs->orig) {
if (!this->qs->orig.has_value() || this->qs->text.GetText() != this->qs->orig) {
/* pass information by simulating a button press on parent window */
if (this->qs->ok_button >= 0) {
this->parent->OnClick(pt, this->qs->ok_button, 1);
@@ -412,7 +412,7 @@ void UpdateOSKOriginalText(const Window *parent, WidgetID button)
OskWindow *osk = dynamic_cast<OskWindow *>(FindWindowById(WC_OSK, 0));
if (osk == nullptr || osk->parent != parent || osk->text_btn != button) return;
osk->orig_str = osk->qs->text.buf;
osk->orig_str = osk->qs->text.GetText();
osk->SetDirty();
}