File diff r26004:403650007dd8 → r26005:fa9fad1bd9d6
src/network/network_gui.cpp
Show inline comments
 
@@ -610,12 +610,14 @@ public:
 
		/* 'Join' button disabling conditions */
 
		this->SetWidgetDisabledState(WID_NG_JOIN, sel == nullptr || // no Selected Server
 
				sel->status != NGLS_ONLINE || // Server offline
 
				sel->info.clients_on >= sel->info.clients_max || // Server full
 
				!sel->info.compatible); // Revision mismatch
 

	
 
		this->SetWidgetLoweredState(WID_NG_REFRESH, sel != nullptr && sel->refreshing);
 

	
 
		/* 'NewGRF Settings' button invisible if no NewGRF is used */
 
		this->GetWidget<NWidgetStacked>(WID_NG_NEWGRF_SEL)->SetDisplayedPlane(sel == nullptr || sel->status != NGLS_ONLINE || sel->info.grfconfig == nullptr);
 
		this->GetWidget<NWidgetStacked>(WID_NG_NEWGRF_MISSING_SEL)->SetDisplayedPlane(sel == nullptr || sel->status != NGLS_ONLINE || sel->info.grfconfig == nullptr || !sel->info.version_compatible || sel->info.compatible);
 

	
 
#ifdef __EMSCRIPTEN__
 
		this->SetWidgetDisabledState(WID_NG_SEARCH_INTERNET, true);
 
@@ -787,13 +789,13 @@ public:
 
				if (this->server != nullptr) {
 
					NetworkClientConnectGame(this->server->connection_string, COMPANY_SPECTATOR);
 
				}
 
				break;
 

	
 
			case WID_NG_REFRESH: // Refresh
 
				if (this->server != nullptr) NetworkQueryServer(this->server->connection_string);
 
				if (this->server != nullptr && !this->server->refreshing) NetworkQueryServer(this->server->connection_string);
 
				break;
 

	
 
			case WID_NG_NEWGRF: // NewGRF Settings
 
				if (this->server != nullptr) ShowNewGRFSettings(false, false, false, &this->server->info.grfconfig);
 
				break;