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

Method OnClick

src/network/network_gui.cpp:2272–2293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2270 }
2271
2272 void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
2273 {
2274 switch (widget) {
2275 case WID_NAS_PREVIEW:
2276 ShowSurveyResultTextfileWindow(this);
2277 break;
2278
2279 case WID_NAS_LINK:
2280 OpenBrowser(NETWORK_SURVEY_DETAILS_LINK);
2281 break;
2282
2283 case WID_NAS_NO:
2284 _settings_client.network.participate_survey = PS_NO;
2285 this->Close();
2286 break;
2287
2288 case WID_NAS_YES:
2289 _settings_client.network.participate_survey = PS_YES;
2290 this->Close();
2291 break;
2292 }
2293 }
2294};
2295
2296static constexpr std::initializer_list<NWidgetPart> _nested_network_ask_survey_widgets = {

Callers

nothing calls this directly

Calls 3

OpenBrowserFunction · 0.85
CloseMethod · 0.45

Tested by

no test coverage detected