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

Method EnableTextfileButton

src/help_gui.cpp:172–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170
171private:
172 void EnableTextfileButton(std::string_view filename, Subdirectory subdir, WidgetID button_widget)
173 {
174 this->GetWidget<NWidgetLeaf>(button_widget)->SetDisabled(!FindGameManualFilePath(filename, subdir).has_value());
175 }
176};
177
178static constexpr std::initializer_list<NWidgetPart> _nested_helpwin_widgets = {

Callers 1

HelpWindowMethod · 0.95

Calls 2

FindGameManualFilePathFunction · 0.85
SetDisabledMethod · 0.80

Tested by

no test coverage detected