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

@@ -1363,7 +1363,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
if (!this->editable) return;
if (widget == WID_NS_FILTER) {
string_filter.SetFilterTerm(this->filter_editbox.text.buf);
string_filter.SetFilterTerm(this->filter_editbox.text.GetText());
this->avails.SetFilterState(!string_filter.IsEmpty());
this->avails.ForceRebuild();
this->InvalidateData(0);
@@ -2157,7 +2157,7 @@ struct SavePresetWindow : public Window {
case WID_SVP_SAVE: {
Window *w = FindWindowById(WC_GAME_OPTIONS, WN_GAME_OPTIONS_NEWGRF_STATE);
if (w != nullptr && !StrEmpty(this->presetname_editbox.text.buf)) w->OnQueryTextFinished(this->presetname_editbox.text.buf);
if (w != nullptr && !StrEmpty(this->presetname_editbox.text.GetText())) w->OnQueryTextFinished(this->presetname_editbox.text.GetText());
this->Close();
break;
}