| 1918 | } |
| 1919 | |
| 1920 | void OnQueryTextFinished(std::optional<std::string> str) override |
| 1921 | { |
| 1922 | if (!str.has_value()) return; |
| 1923 | |
| 1924 | switch (this->query_widget) { |
| 1925 | default: NOT_REACHED(); |
| 1926 | |
| 1927 | case WID_CL_SERVER_NAME_EDIT: { |
| 1928 | if (!_network_server) break; |
| 1929 | |
| 1930 | SetSettingValue(GetSettingFromName("network.server_name")->AsStringSetting(), *str); |
| 1931 | this->InvalidateData(); |
| 1932 | break; |
| 1933 | } |
| 1934 | |
| 1935 | case WID_CL_CLIENT_NAME_EDIT: { |
| 1936 | SetSettingValue(GetSettingFromName("network.client_name")->AsStringSetting(), *str); |
| 1937 | this->InvalidateData(); |
| 1938 | break; |
| 1939 | } |
| 1940 | } |
| 1941 | } |
| 1942 | |
| 1943 | void DrawWidget(const Rect &r, WidgetID widget) const override |
| 1944 | { |
nothing calls this directly
no test coverage detected