MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / OnEditboxChanged

Method OnEditboxChanged

src/settings_gui.cpp:1591–1602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1589 }
1590
1591 void OnEditboxChanged(WidgetID wid) override
1592 {
1593 if (wid == WID_GO_FILTER) {
1594 this->filter.string.SetFilterTerm(this->filter_editbox.text.GetText());
1595 if (!this->filter.string.IsEmpty() && !this->manually_changed_folding) {
1596 /* User never expanded/collapsed single pages and entered a filter term.
1597 * Expand everything, to save weird expand clicks, */
1598 GetSettingsTree().UnFoldAll();
1599 }
1600 this->InvalidateData();
1601 }
1602 }
1603};
1604
1605static constexpr std::initializer_list<NWidgetPart> _nested_game_options_widgets = {

Callers

nothing calls this directly

Calls 5

SetFilterTermMethod · 0.80
GetTextMethod · 0.45
IsEmptyMethod · 0.45
UnFoldAllMethod · 0.45
InvalidateDataMethod · 0.45

Tested by

no test coverage detected