|
|
@ -43,7 +43,6 @@ struct chatquerystr_d : public querystr_d {
|
|
|
|
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(chatquerystr_d));
|
|
|
|
assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(chatquerystr_d));
|
|
|
|
|
|
|
|
|
|
|
|
struct network_d {
|
|
|
|
struct network_d {
|
|
|
|
PlayerID company; // select company in network lobby
|
|
|
|
|
|
|
|
byte field; // select text-field in start-server and game-listing
|
|
|
|
byte field; // select text-field in start-server and game-listing
|
|
|
|
byte widget_id; ///< The widget that has the pop-up input menu
|
|
|
|
byte widget_id; ///< The widget that has the pop-up input menu
|
|
|
|
NetworkGameList *server; // selected server in lobby and game-listing
|
|
|
|
NetworkGameList *server; // selected server in lobby and game-listing
|
|
|
@ -1030,164 +1029,155 @@ enum NetworkLobbyWindowWidgets {
|
|
|
|
NLWW_CANCEL = 12, ///< 'Cancel' button
|
|
|
|
NLWW_CANCEL = 12, ///< 'Cancel' button
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
struct NetworkLobbyWindow : public Window {
|
|
|
|
* Handler of actions done in the NetworkLobby window
|
|
|
|
PlayerID company; ///< Select company
|
|
|
|
*
|
|
|
|
NetworkGameList *server; ///< Selected server
|
|
|
|
* @param w pointer to the Window structure
|
|
|
|
|
|
|
|
* @param e pointer to window event
|
|
|
|
|
|
|
|
* @note uses network_d WP macro
|
|
|
|
|
|
|
|
* @see struct _network_lobby_window_widgets
|
|
|
|
|
|
|
|
* @see enum NetworkLobbyWindowWidgets
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
static void NetworkLobbyWindowWndProc(Window *w, WindowEvent *e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
network_d *nd = &WP(w, network_d);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (e->event) {
|
|
|
|
|
|
|
|
case WE_CREATE:
|
|
|
|
|
|
|
|
nd->company = INVALID_PLAYER;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WE_PAINT: {
|
|
|
|
NetworkLobbyWindow(const WindowDesc *desc, NetworkGameList *ngl) :
|
|
|
|
const NetworkGameInfo *gi = &nd->server->info;
|
|
|
|
Window(desc), company(INVALID_PLAYER), server(ngl)
|
|
|
|
int y = NET_PRC__OFFSET_TOP_WIDGET_COMPANY, pos;
|
|
|
|
{
|
|
|
|
|
|
|
|
strcpy(_edit_str_net_buf, "");
|
|
|
|
/* Join button is disabled when no company is selected */
|
|
|
|
this->vscroll.cap = 10;
|
|
|
|
w->SetWidgetDisabledState(NLWW_JOIN, nd->company == INVALID_PLAYER);
|
|
|
|
}
|
|
|
|
/* Cannot start new company if there are too many */
|
|
|
|
|
|
|
|
w->SetWidgetDisabledState(NLWW_NEW, gi->companies_on >= gi->companies_max);
|
|
|
|
|
|
|
|
/* Cannot spectate if there are too many spectators */
|
|
|
|
|
|
|
|
w->SetWidgetDisabledState(NLWW_SPECTATE, gi->spectators_on >= gi->spectators_max);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Draw window widgets */
|
|
|
|
|
|
|
|
SetDParamStr(0, gi->server_name);
|
|
|
|
|
|
|
|
DrawWindowWidgets(w);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Draw company list */
|
|
|
|
|
|
|
|
pos = w->vscroll.pos;
|
|
|
|
|
|
|
|
while (pos < gi->companies_on) {
|
|
|
|
|
|
|
|
byte company = NetworkLobbyFindCompanyIndex(pos);
|
|
|
|
|
|
|
|
bool income = false;
|
|
|
|
|
|
|
|
if (nd->company == company)
|
|
|
|
|
|
|
|
GfxFillRect(11, y - 1, 154, y + 10, 10); // show highlighted item with a different colour
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DoDrawStringTruncated(_network_player_info[company].company_name, 13, y, TC_BLACK, 135 - 13);
|
|
|
|
|
|
|
|
if (_network_player_info[company].use_password != 0) DrawSprite(SPR_LOCK, PAL_NONE, 135, y);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* If the company's income was positive puts a green dot else a red dot */
|
|
|
|
|
|
|
|
if (_network_player_info[company].income >= 0) income = true;
|
|
|
|
|
|
|
|
DrawSprite(SPR_BLOT, income ? PALETTE_TO_GREEN : PALETTE_TO_RED, 145, y);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pos++;
|
|
|
|
virtual void OnPaint()
|
|
|
|
y += NET_PRC__SIZE_OF_ROW;
|
|
|
|
{
|
|
|
|
if (pos >= w->vscroll.cap) break;
|
|
|
|
const NetworkGameInfo *gi = &this->server->info;
|
|
|
|
|
|
|
|
int y = NET_PRC__OFFSET_TOP_WIDGET_COMPANY, pos;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Join button is disabled when no company is selected */
|
|
|
|
|
|
|
|
this->SetWidgetDisabledState(NLWW_JOIN, this->company == INVALID_PLAYER);
|
|
|
|
|
|
|
|
/* Cannot start new company if there are too many */
|
|
|
|
|
|
|
|
this->SetWidgetDisabledState(NLWW_NEW, gi->companies_on >= gi->companies_max);
|
|
|
|
|
|
|
|
/* Cannot spectate if there are too many spectators */
|
|
|
|
|
|
|
|
this->SetWidgetDisabledState(NLWW_SPECTATE, gi->spectators_on >= gi->spectators_max);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Draw window widgets */
|
|
|
|
|
|
|
|
SetDParamStr(0, gi->server_name);
|
|
|
|
|
|
|
|
DrawWindowWidgets(this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Draw company list */
|
|
|
|
|
|
|
|
pos = this->vscroll.pos;
|
|
|
|
|
|
|
|
while (pos < gi->companies_on) {
|
|
|
|
|
|
|
|
byte company = NetworkLobbyFindCompanyIndex(pos);
|
|
|
|
|
|
|
|
bool income = false;
|
|
|
|
|
|
|
|
if (this->company == company) {
|
|
|
|
|
|
|
|
GfxFillRect(11, y - 1, 154, y + 10, 10); // show highlighted item with a different colour
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Draw info about selected company when it is selected in the left window */
|
|
|
|
DoDrawStringTruncated(_network_player_info[company].company_name, 13, y, TC_BLACK, 135 - 13);
|
|
|
|
GfxFillRect(174, 39, 403, 75, 157);
|
|
|
|
if (_network_player_info[company].use_password != 0) DrawSprite(SPR_LOCK, PAL_NONE, 135, y);
|
|
|
|
DrawStringCentered(290, 50, STR_NETWORK_COMPANY_INFO, TC_FROMSTRING);
|
|
|
|
|
|
|
|
if (nd->company != INVALID_PLAYER) {
|
|
|
|
|
|
|
|
const uint x = 183;
|
|
|
|
|
|
|
|
const uint trunc_width = w->widget[NLWW_DETAILS].right - x;
|
|
|
|
|
|
|
|
y = 80;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, nd->server->info.clients_on);
|
|
|
|
|
|
|
|
SetDParam(1, nd->server->info.clients_max);
|
|
|
|
|
|
|
|
SetDParam(2, nd->server->info.companies_on);
|
|
|
|
|
|
|
|
SetDParam(3, nd->server->info.companies_max);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_CLIENTS, TC_GOLD);
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParamStr(0, _network_player_info[nd->company].company_name);
|
|
|
|
|
|
|
|
DrawStringTruncated(x, y, STR_NETWORK_COMPANY_NAME, TC_GOLD, trunc_width);
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, _network_player_info[nd->company].inaugurated_year);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_INAUGURATION_YEAR, TC_GOLD); // inauguration year
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, _network_player_info[nd->company].company_value);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_VALUE, TC_GOLD); // company value
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, _network_player_info[nd->company].money);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_CURRENT_BALANCE, TC_GOLD); // current balance
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, _network_player_info[nd->company].income);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_LAST_YEARS_INCOME, TC_GOLD); // last year's income
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, _network_player_info[nd->company].performance);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_PERFORMANCE, TC_GOLD); // performance
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, _network_player_info[nd->company].num_vehicle[0]);
|
|
|
|
|
|
|
|
SetDParam(1, _network_player_info[nd->company].num_vehicle[1]);
|
|
|
|
|
|
|
|
SetDParam(2, _network_player_info[nd->company].num_vehicle[2]);
|
|
|
|
|
|
|
|
SetDParam(3, _network_player_info[nd->company].num_vehicle[3]);
|
|
|
|
|
|
|
|
SetDParam(4, _network_player_info[nd->company].num_vehicle[4]);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_VEHICLES, TC_GOLD); // vehicles
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, _network_player_info[nd->company].num_station[0]);
|
|
|
|
/* If the company's income was positive puts a green dot else a red dot */
|
|
|
|
SetDParam(1, _network_player_info[nd->company].num_station[1]);
|
|
|
|
if (_network_player_info[company].income >= 0) income = true;
|
|
|
|
SetDParam(2, _network_player_info[nd->company].num_station[2]);
|
|
|
|
DrawSprite(SPR_BLOT, income ? PALETTE_TO_GREEN : PALETTE_TO_RED, 145, y);
|
|
|
|
SetDParam(3, _network_player_info[nd->company].num_station[3]);
|
|
|
|
|
|
|
|
SetDParam(4, _network_player_info[nd->company].num_station[4]);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_STATIONS, TC_GOLD); // stations
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParamStr(0, _network_player_info[nd->company].players);
|
|
|
|
pos++;
|
|
|
|
DrawStringTruncated(x, y, STR_NETWORK_PLAYERS, TC_GOLD, trunc_width); // players
|
|
|
|
y += NET_PRC__SIZE_OF_ROW;
|
|
|
|
}
|
|
|
|
if (pos >= this->vscroll.cap) break;
|
|
|
|
} break;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
case WE_CLICK:
|
|
|
|
/* Draw info about selected company when it is selected in the left window */
|
|
|
|
switch (e->we.click.widget) {
|
|
|
|
GfxFillRect(174, 39, 403, 75, 157);
|
|
|
|
case NLWW_CLOSE: // Close 'X'
|
|
|
|
DrawStringCentered(290, 50, STR_NETWORK_COMPANY_INFO, TC_FROMSTRING);
|
|
|
|
case NLWW_CANCEL: // Cancel button
|
|
|
|
if (this->company != INVALID_PLAYER) {
|
|
|
|
ShowNetworkGameWindow();
|
|
|
|
const uint x = 183;
|
|
|
|
break;
|
|
|
|
const uint trunc_width = this->widget[NLWW_DETAILS].right - x;
|
|
|
|
|
|
|
|
y = 80;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, gi->clients_on);
|
|
|
|
|
|
|
|
SetDParam(1, gi->clients_max);
|
|
|
|
|
|
|
|
SetDParam(2, gi->companies_on);
|
|
|
|
|
|
|
|
SetDParam(3, gi->companies_max);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_CLIENTS, TC_GOLD);
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParamStr(0, _network_player_info[this->company].company_name);
|
|
|
|
|
|
|
|
DrawStringTruncated(x, y, STR_NETWORK_COMPANY_NAME, TC_GOLD, trunc_width);
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, _network_player_info[this->company].inaugurated_year);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_INAUGURATION_YEAR, TC_GOLD); // inauguration year
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, _network_player_info[this->company].company_value);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_VALUE, TC_GOLD); // company value
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, _network_player_info[this->company].money);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_CURRENT_BALANCE, TC_GOLD); // current balance
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, _network_player_info[this->company].income);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_LAST_YEARS_INCOME, TC_GOLD); // last year's income
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, _network_player_info[this->company].performance);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_PERFORMANCE, TC_GOLD); // performance
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, _network_player_info[this->company].num_vehicle[0]);
|
|
|
|
|
|
|
|
SetDParam(1, _network_player_info[this->company].num_vehicle[1]);
|
|
|
|
|
|
|
|
SetDParam(2, _network_player_info[this->company].num_vehicle[2]);
|
|
|
|
|
|
|
|
SetDParam(3, _network_player_info[this->company].num_vehicle[3]);
|
|
|
|
|
|
|
|
SetDParam(4, _network_player_info[this->company].num_vehicle[4]);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_VEHICLES, TC_GOLD); // vehicles
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParam(0, _network_player_info[this->company].num_station[0]);
|
|
|
|
|
|
|
|
SetDParam(1, _network_player_info[this->company].num_station[1]);
|
|
|
|
|
|
|
|
SetDParam(2, _network_player_info[this->company].num_station[2]);
|
|
|
|
|
|
|
|
SetDParam(3, _network_player_info[this->company].num_station[3]);
|
|
|
|
|
|
|
|
SetDParam(4, _network_player_info[this->company].num_station[4]);
|
|
|
|
|
|
|
|
DrawString(x, y, STR_NETWORK_STATIONS, TC_GOLD); // stations
|
|
|
|
|
|
|
|
y += 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetDParamStr(0, _network_player_info[this->company].players);
|
|
|
|
|
|
|
|
DrawStringTruncated(x, y, STR_NETWORK_PLAYERS, TC_GOLD, trunc_width); // players
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
case NLWW_MATRIX: { // Company list
|
|
|
|
virtual void OnClick(Point pt, int widget)
|
|
|
|
uint32 id_v = (e->we.click.pt.y - NET_PRC__OFFSET_TOP_WIDGET_COMPANY) / NET_PRC__SIZE_OF_ROW;
|
|
|
|
{
|
|
|
|
|
|
|
|
switch (widget) {
|
|
|
|
|
|
|
|
case NLWW_CLOSE: // Close 'X'
|
|
|
|
|
|
|
|
case NLWW_CANCEL: // Cancel button
|
|
|
|
|
|
|
|
ShowNetworkGameWindow();
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
if (id_v >= w->vscroll.cap) break;
|
|
|
|
case NLWW_MATRIX: { // Company list
|
|
|
|
|
|
|
|
uint32 id_v = (pt.y - NET_PRC__OFFSET_TOP_WIDGET_COMPANY) / NET_PRC__SIZE_OF_ROW;
|
|
|
|
|
|
|
|
|
|
|
|
id_v += w->vscroll.pos;
|
|
|
|
if (id_v >= this->vscroll.cap) break;
|
|
|
|
nd->company = (id_v >= nd->server->info.companies_on) ? INVALID_PLAYER : NetworkLobbyFindCompanyIndex(id_v);
|
|
|
|
|
|
|
|
SetWindowDirty(w);
|
|
|
|
|
|
|
|
} break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case NLWW_JOIN: // Join company
|
|
|
|
id_v += this->vscroll.pos;
|
|
|
|
/* Button can be clicked only when it is enabled */
|
|
|
|
this->company = (id_v >= this->server->info.companies_on) ? INVALID_PLAYER : NetworkLobbyFindCompanyIndex(id_v);
|
|
|
|
_network_playas = nd->company;
|
|
|
|
this->SetDirty();
|
|
|
|
NetworkClientConnectGame(_network_last_host, _network_last_port);
|
|
|
|
} break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case NLWW_NEW: // New company
|
|
|
|
case NLWW_JOIN: // Join company
|
|
|
|
_network_playas = PLAYER_NEW_COMPANY;
|
|
|
|
/* Button can be clicked only when it is enabled */
|
|
|
|
NetworkClientConnectGame(_network_last_host, _network_last_port);
|
|
|
|
_network_playas = this->company;
|
|
|
|
break;
|
|
|
|
NetworkClientConnectGame(_network_last_host, _network_last_port);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case NLWW_SPECTATE: // Spectate game
|
|
|
|
case NLWW_NEW: // New company
|
|
|
|
_network_playas = PLAYER_SPECTATOR;
|
|
|
|
_network_playas = PLAYER_NEW_COMPANY;
|
|
|
|
NetworkClientConnectGame(_network_last_host, _network_last_port);
|
|
|
|
NetworkClientConnectGame(_network_last_host, _network_last_port);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case NLWW_REFRESH: // Refresh
|
|
|
|
case NLWW_SPECTATE: // Spectate game
|
|
|
|
NetworkTCPQueryServer(_network_last_host, _network_last_port); // company info
|
|
|
|
_network_playas = PLAYER_SPECTATOR;
|
|
|
|
NetworkUDPQueryServer(_network_last_host, _network_last_port); // general data
|
|
|
|
NetworkClientConnectGame(_network_last_host, _network_last_port);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WE_INVALIDATE_DATA:
|
|
|
|
case NLWW_REFRESH: // Refresh
|
|
|
|
SetWindowDirty(w);
|
|
|
|
NetworkTCPQueryServer(_network_last_host, _network_last_port); // company info
|
|
|
|
break;
|
|
|
|
NetworkUDPQueryServer(_network_last_host, _network_last_port); // general data
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static const Widget _network_lobby_window_widgets[] = {
|
|
|
|
static const Widget _network_lobby_window_widgets[] = {
|
|
|
|
{ WWT_CLOSEBOX, RESIZE_NONE, BGC, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, // NLWW_CLOSE
|
|
|
|
{ WWT_CLOSEBOX, RESIZE_NONE, BGC, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW }, // NLWW_CLOSE
|
|
|
@ -1218,7 +1208,7 @@ static const WindowDesc _network_lobby_window_desc = {
|
|
|
|
WC_NETWORK_WINDOW, WC_NONE,
|
|
|
|
WC_NETWORK_WINDOW, WC_NONE,
|
|
|
|
WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
|
|
|
|
WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
|
|
|
|
_network_lobby_window_widgets,
|
|
|
|
_network_lobby_window_widgets,
|
|
|
|
NetworkLobbyWindowWndProc,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/* Show the networklobbywindow with the selected server
|
|
|
|
/* Show the networklobbywindow with the selected server
|
|
|
@ -1230,12 +1220,7 @@ static void ShowNetworkLobbyWindow(NetworkGameList *ngl)
|
|
|
|
NetworkTCPQueryServer(_network_last_host, _network_last_port); // company info
|
|
|
|
NetworkTCPQueryServer(_network_last_host, _network_last_port); // company info
|
|
|
|
NetworkUDPQueryServer(_network_last_host, _network_last_port); // general data
|
|
|
|
NetworkUDPQueryServer(_network_last_host, _network_last_port); // general data
|
|
|
|
|
|
|
|
|
|
|
|
Window *w = new Window(&_network_lobby_window_desc);
|
|
|
|
new NetworkLobbyWindow(&_network_lobby_window_desc, ngl);
|
|
|
|
if (w != NULL) {
|
|
|
|
|
|
|
|
WP(w, network_ql_d).n.server = ngl;
|
|
|
|
|
|
|
|
strcpy(_edit_str_net_buf, "");
|
|
|
|
|
|
|
|
w->vscroll.cap = 10;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// The window below gives information about the connected clients
|
|
|
|
// The window below gives information about the connected clients
|
|
|
|