1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-23 04:04:09 +01:00

Change: Remove extra close buttons from some windows. (#14124)

All windows have an X button to close it, so remove the redundant close buttons.
This commit is contained in:
Peter Nelson
2025-05-12 14:54:44 +01:00
committed by GitHub
parent a62081d79e
commit d9247fa1a0
9 changed files with 7 additions and 57 deletions

View File

@@ -671,10 +671,6 @@ public:
void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
{
switch (widget) {
case WID_NG_CANCEL: // Cancel button
CloseWindowById(WC_NETWORK_WINDOW, WN_NETWORK_WINDOW_GAME);
break;
case WID_NG_NAME: // Sort by name
case WID_NG_CLIENTS: // Sort by connected clients
case WID_NG_MAPSIZE: // Sort by map size
@@ -926,7 +922,6 @@ static constexpr NWidgetPart _nested_network_game_widgets[] = {
NWidget(WWT_PUSHTXTBTN, COLOUR_WHITE, WID_NG_SEARCH_LAN), SetResize(1, 0), SetFill(1, 0), SetStringTip(STR_NETWORK_SERVER_LIST_SEARCH_SERVER_LAN, STR_NETWORK_SERVER_LIST_SEARCH_SERVER_LAN_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_WHITE, WID_NG_ADD), SetResize(1, 0), SetFill(1, 0), SetStringTip(STR_NETWORK_SERVER_LIST_ADD_SERVER, STR_NETWORK_SERVER_LIST_ADD_SERVER_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_WHITE, WID_NG_START), SetResize(1, 0), SetFill(1, 0), SetStringTip(STR_NETWORK_SERVER_LIST_START_SERVER, STR_NETWORK_SERVER_LIST_START_SERVER_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_WHITE, WID_NG_CANCEL), SetResize(1, 0), SetFill(1, 0), SetStringTip(STR_BUTTON_CANCEL),
EndContainer(),
EndContainer(),
/* Resize button. */