src/network/network_gui.cpp
branchnoai
changeset 9724 b39bc69bb2f2
parent 9723 eee46cb39750
child 9826 9707ad4c9b60
equal deleted inserted replaced
9723:eee46cb39750 9724:b39bc69bb2f2
     2 
     2 
     3 #ifdef ENABLE_NETWORK
     3 #ifdef ENABLE_NETWORK
     4 #include "../stdafx.h"
     4 #include "../stdafx.h"
     5 #include "../openttd.h"
     5 #include "../openttd.h"
     6 #include "../strings_func.h"
     6 #include "../strings_func.h"
     7 #include "../table/sprites.h"
       
     8 #include "network.h"
     7 #include "network.h"
     9 #include "../date_func.h"
     8 #include "../date_func.h"
    10 
       
    11 #include "../fios.h"
     9 #include "../fios.h"
    12 #include "table/strings.h"
       
    13 #include "network_data.h"
    10 #include "network_data.h"
    14 #include "network_client.h"
    11 #include "network_client.h"
    15 #include "network_gui.h"
    12 #include "network_gui.h"
    16 #include "network_gamelist.h"
    13 #include "network_gamelist.h"
    17 #include "../gui.h"
    14 #include "../gui.h"
    25 #include "../functions.h"
    22 #include "../functions.h"
    26 #include "../window_func.h"
    23 #include "../window_func.h"
    27 #include "../core/alloc_func.hpp"
    24 #include "../core/alloc_func.hpp"
    28 #include "../string_func.h"
    25 #include "../string_func.h"
    29 #include "../gfx_func.h"
    26 #include "../gfx_func.h"
       
    27 #include "../player_func.h"
       
    28 #include "../settings_type.h"
       
    29 #include "../widgets/dropdown_func.h"
       
    30 
       
    31 #include "table/strings.h"
       
    32 #include "../table/sprites.h"
    30 
    33 
    31 #define BGC 5
    34 #define BGC 5
    32 #define BTC 15
    35 #define BTC 15
    33 
    36 
    34 struct chatquerystr_d : public querystr_d {
    37 struct chatquerystr_d : public querystr_d {
   213 }
   216 }
   214 
   217 
   215 /** Enum for NetworkGameWindow, referring to _network_game_window_widgets */
   218 /** Enum for NetworkGameWindow, referring to _network_game_window_widgets */
   216 enum NetworkGameWindowWidgets {
   219 enum NetworkGameWindowWidgets {
   217 	NGWW_CLOSE    = 0,  ///< Close 'X' button
   220 	NGWW_CLOSE    = 0,  ///< Close 'X' button
   218 	NGWW_CONN_TXT = 4,  ///< 'Connection' droplist
   221 	NGWW_CONN_BTN = 4,  ///< 'Connection' droplist button
   219 	NGWW_CONN_BTN = 5,  ///< 'Connection' droplist button
   222 	NGWW_PLAYER   = 5,  ///< Panel with editbox to set player name
   220 	NGWW_PLAYER   = 6,  ///< Panel with editbox to set player name
   223 
   221 
   224 	NGWW_NAME     = 6,  ///< 'Name' button
   222 	NGWW_NAME     = 7,  ///< 'Name' button
       
   223 	NGWW_CLIENTS,       ///< 'Clients' button
   225 	NGWW_CLIENTS,       ///< 'Clients' button
   224 	NGWW_INFO,          ///< Third button in the game list panel
   226 	NGWW_INFO,          ///< Third button in the game list panel
   225 
   227 
   226 	NGWW_MATRIX   = 10, ///< Panel with list of games
   228 	NGWW_MATRIX   = 9,  ///< Panel with list of games
   227 
   229 
   228 	NGWW_DETAILS  = 12, ///< Panel with game details
   230 	NGWW_DETAILS  = 11, ///< Panel with game details
   229 	NGWW_JOIN     = 13, ///< 'Join game' button
   231 	NGWW_JOIN     = 12, ///< 'Join game' button
   230 	NGWW_REFRESH  = 14, ///< 'Refresh server' button
   232 	NGWW_REFRESH  = 13, ///< 'Refresh server' button
   231 	NGWW_NEWGRF   = 15, ///< 'NewGRF Settings' button
   233 	NGWW_NEWGRF   = 14, ///< 'NewGRF Settings' button
   232 
   234 
   233 	NGWW_FIND     = 16, ///< 'Find server' button
   235 	NGWW_FIND     = 15, ///< 'Find server' button
   234 	NGWW_ADD,           ///< 'Add server' button
   236 	NGWW_ADD,           ///< 'Add server' button
   235 	NGWW_START,         ///< 'Start server' button
   237 	NGWW_START,         ///< 'Start server' button
   236 	NGWW_CANCEL,        ///< 'Cancel' button
   238 	NGWW_CANCEL,        ///< 'Cancel' button
   237 };
   239 };
   238 
   240 
   264 		ld->sort_type = _ng_sorting.criteria;
   266 		ld->sort_type = _ng_sorting.criteria;
   265 		break;
   267 		break;
   266 
   268 
   267 	case WE_PAINT: {
   269 	case WE_PAINT: {
   268 		const NetworkGameList *sel = nd->server;
   270 		const NetworkGameList *sel = nd->server;
   269 		const char *arrow = (ld->flags & VL_DESC) ? DOWNARROW : UPARROW;
   271 		const SortButtonState arrow = (ld->flags & VL_DESC) ? SBS_DOWN : SBS_UP;
   270 
   272 
   271 		if (ld->flags & VL_REBUILD) {
   273 		if (ld->flags & VL_REBUILD) {
   272 			BuildNetworkGameList(&WP(w, network_ql_d));
   274 			BuildNetworkGameList(&WP(w, network_ql_d));
   273 			SetVScrollCount(w, ld->list_length);
   275 			SetVScrollCount(w, ld->list_length);
   274 		}
   276 		}
   296 
   298 
   297 		DrawString(w->widget[NGWW_PLAYER].left - 100, 23, STR_NETWORK_PLAYER_NAME, TC_GOLD);
   299 		DrawString(w->widget[NGWW_PLAYER].left - 100, 23, STR_NETWORK_PLAYER_NAME, TC_GOLD);
   298 
   300 
   299 		/* Sort based on widgets: name, clients, compatibility */
   301 		/* Sort based on widgets: name, clients, compatibility */
   300 		switch (ld->sort_type) {
   302 		switch (ld->sort_type) {
   301 			case NGWW_NAME    - NGWW_NAME: DoDrawString(arrow, w->widget[NGWW_NAME].right    - 10, 42, TC_BLACK); break;
   303 			case NGWW_NAME    - NGWW_NAME: DrawSortButtonState(w, NGWW_NAME,    arrow); break;
   302 			case NGWW_CLIENTS - NGWW_NAME: DoDrawString(arrow, w->widget[NGWW_CLIENTS].right - 10, 42, TC_BLACK); break;
   304 			case NGWW_CLIENTS - NGWW_NAME: DrawSortButtonState(w, NGWW_CLIENTS, arrow); break;
   303 			case NGWW_INFO    - NGWW_NAME: DoDrawString(arrow, w->widget[NGWW_INFO].right    - 10, 42, TC_BLACK); break;
   305 			case NGWW_INFO    - NGWW_NAME: DrawSortButtonState(w, NGWW_INFO,    arrow); break;
   304 		}
   306 		}
   305 
   307 
   306 		{ // draw list of games
   308 		{ // draw list of games
   307 			uint16 y = NET_PRC__OFFSET_TOP_WIDGET + 3;
   309 			uint16 y = NET_PRC__OFFSET_TOP_WIDGET + 3;
   308 			int32 n = 0;
   310 			int32 n = 0;
   424 		nd->field = e->we.click.widget;
   426 		nd->field = e->we.click.widget;
   425 		switch (e->we.click.widget) {
   427 		switch (e->we.click.widget) {
   426 		case NGWW_CANCEL: // Cancel button
   428 		case NGWW_CANCEL: // Cancel button
   427 			DeleteWindowById(WC_NETWORK_WINDOW, 0);
   429 			DeleteWindowById(WC_NETWORK_WINDOW, 0);
   428 			break;
   430 			break;
   429 		case NGWW_CONN_TXT: case NGWW_CONN_BTN: // 'Connection' droplist
   431 		case NGWW_CONN_BTN: // 'Connection' droplist
   430 			ShowDropDownMenu(w, _lan_internet_types_dropdown, _network_lan_internet, NGWW_CONN_BTN, 0, 0); // do it for widget NSSW_CONN_BTN
   432 			ShowDropDownMenu(w, _lan_internet_types_dropdown, _network_lan_internet, NGWW_CONN_BTN, 0, 0); // do it for widget NSSW_CONN_BTN
   431 			break;
   433 			break;
   432 		case NGWW_NAME: // Sort by name
   434 		case NGWW_NAME: // Sort by name
   433 		case NGWW_CLIENTS: // Sort by connected clients
   435 		case NGWW_CLIENTS: // Sort by connected clients
   434 		case NGWW_INFO: // Connectivity (green dot)
   436 		case NGWW_INFO: // Connectivity (green dot)
   567 {   WWT_CLOSEBOX,   RESIZE_NONE,   BGC,     0,    10,     0,    13, STR_00C5,                       STR_018B_CLOSE_WINDOW},            // NGWW_CLOSE
   569 {   WWT_CLOSEBOX,   RESIZE_NONE,   BGC,     0,    10,     0,    13, STR_00C5,                       STR_018B_CLOSE_WINDOW},            // NGWW_CLOSE
   568 {    WWT_CAPTION,   RESIZE_RIGHT,  BGC,    11,   449,     0,    13, STR_NETWORK_MULTIPLAYER,        STR_NULL},
   570 {    WWT_CAPTION,   RESIZE_RIGHT,  BGC,    11,   449,     0,    13, STR_NETWORK_MULTIPLAYER,        STR_NULL},
   569 {      WWT_PANEL,   RESIZE_RB,     BGC,     0,   449,    14,   263, 0x0,                            STR_NULL},
   571 {      WWT_PANEL,   RESIZE_RB,     BGC,     0,   449,    14,   263, 0x0,                            STR_NULL},
   570 
   572 
   571 {       WWT_TEXT,   RESIZE_NONE,   BGC,     9,    85,    23,    35, STR_NETWORK_CONNECTION,         STR_NULL},
   573 {       WWT_TEXT,   RESIZE_NONE,   BGC,     9,    85,    23,    35, STR_NETWORK_CONNECTION,         STR_NULL},
   572 {      WWT_INSET,   RESIZE_NONE,   BGC,    90,   181,    22,    33, STR_NETWORK_LAN_INTERNET_COMBO, STR_NETWORK_CONNECTION_TIP},       // NGWW_CONN_TXT
   574 { WWT_DROPDOWNIN,   RESIZE_NONE,   BGC,    90,   181,    22,    33, STR_NETWORK_LAN_INTERNET_COMBO, STR_NETWORK_CONNECTION_TIP},       // NGWW_CONN_BTN
   573 {    WWT_TEXTBTN,   RESIZE_NONE,   BGC,   170,   180,    23,    32, STR_0225,                       STR_NETWORK_CONNECTION_TIP},       // NGWW_CONN_BTN
       
   574 
   575 
   575 {      WWT_PANEL,   RESIZE_LR,     BGC,   290,   440,    22,    33, 0x0,                            STR_NETWORK_ENTER_NAME_TIP},       // NGWW_PLAYER
   576 {      WWT_PANEL,   RESIZE_LR,     BGC,   290,   440,    22,    33, 0x0,                            STR_NETWORK_ENTER_NAME_TIP},       // NGWW_PLAYER
   576 
   577 
   577 /* LEFT SIDE */
   578 /* LEFT SIDE */
   578 { WWT_PUSHTXTBTN,   RESIZE_RIGHT,  BTC,    10,    70,    42,    53, STR_NETWORK_GAME_NAME,          STR_NETWORK_GAME_NAME_TIP},        // NGWW_NAME
   579 { WWT_PUSHTXTBTN,   RESIZE_RIGHT,  BTC,    10,    70,    42,    53, STR_NETWORK_GAME_NAME,          STR_NETWORK_GAME_NAME_TIP},        // NGWW_NAME
   650 enum NetworkStartServerWidgets {
   651 enum NetworkStartServerWidgets {
   651 	NSSW_CLOSE           =  0,   ///< Close 'X' button
   652 	NSSW_CLOSE           =  0,   ///< Close 'X' button
   652 	NSSW_GAMENAME        =  4,   ///< Background for editbox to set game name
   653 	NSSW_GAMENAME        =  4,   ///< Background for editbox to set game name
   653 	NSSW_SETPWD          =  5,   ///< 'Set password' button
   654 	NSSW_SETPWD          =  5,   ///< 'Set password' button
   654 	NSSW_SELMAP          =  7,   ///< 'Select map' list
   655 	NSSW_SELMAP          =  7,   ///< 'Select map' list
   655 	NSSW_CONNTYPE_TXT    = 10,   ///< 'Connection type' droplist
   656 	NSSW_CONNTYPE_BTN    = 10,   ///< 'Connection type' droplist button
   656 	NSSW_CONNTYPE_BTN    = 11,   ///< 'Connection type' droplist button
   657 	NSSW_CLIENTS_BTND    = 12,   ///< 'Max clients' downarrow
   657 	NSSW_CLIENTS_BTND    = 13,   ///< 'Max clients' downarrow
   658 	NSSW_CLIENTS_TXT     = 13,   ///< 'Max clients' text
   658 	NSSW_CLIENTS_TXT     = 14,   ///< 'Max clients' text
   659 	NSSW_CLIENTS_BTNU    = 14,   ///< 'Max clients' uparrow
   659 	NSSW_CLIENTS_BTNU    = 15,   ///< 'Max clients' uparrow
   660 	NSSW_COMPANIES_BTND  = 16,   ///< 'Max companies' downarrow
   660 	NSSW_COMPANIES_BTND  = 17,   ///< 'Max companies' downarrow
   661 	NSSW_COMPANIES_TXT   = 17,   ///< 'Max companies' text
   661 	NSSW_COMPANIES_TXT   = 18,   ///< 'Max companies' text
   662 	NSSW_COMPANIES_BTNU  = 18,   ///< 'Max companies' uparrow
   662 	NSSW_COMPANIES_BTNU  = 19,   ///< 'Max companies' uparrow
   663 	NSSW_SPECTATORS_BTND = 20,   ///< 'Max spectators' downarrow
   663 	NSSW_SPECTATORS_BTND = 21,   ///< 'Max spectators' downarrow
   664 	NSSW_SPECTATORS_TXT  = 21,   ///< 'Max spectators' text
   664 	NSSW_SPECTATORS_TXT  = 22,   ///< 'Max spectators' text
   665 	NSSW_SPECTATORS_BTNU = 22,   ///< 'Max spectators' uparrow
   665 	NSSW_SPECTATORS_BTNU = 23,   ///< 'Max spectators' uparrow
   666 	NSSW_LANGUAGE_BTN    = 24,   ///< 'Language spoken' droplist button
   666 	NSSW_LANGUAGE_TXT    = 25,   ///< 'Language spoken' droplist
   667 	NSSW_START           = 25,   ///< 'Start' button
   667 	NSSW_LANGUAGE_BTN    = 26,   ///< 'Language spoken' droplist button
   668 	NSSW_LOAD            = 26,   ///< 'Load' button
   668 	NSSW_START           = 27,   ///< 'Start' button
   669 	NSSW_CANCEL          = 27,   ///< 'Cancel' button
   669 	NSSW_LOAD            = 28,   ///< 'Load' button
       
   670 	NSSW_CANCEL          = 29,   ///< 'Cancel' button
       
   671 };
   670 };
   672 
   671 
   673 /**
   672 /**
   674  * Handler of actions done in the NetworkStartServer window
   673  * Handler of actions done in the NetworkStartServer window
   675  *
   674  *
   748 			if (y >= w->vscroll.count) return;
   747 			if (y >= w->vscroll.count) return;
   749 
   748 
   750 			nd->map = (y == 0) ? NULL : _fios_list + y - 1;
   749 			nd->map = (y == 0) ? NULL : _fios_list + y - 1;
   751 			SetWindowDirty(w);
   750 			SetWindowDirty(w);
   752 			} break;
   751 			} break;
   753 		case NSSW_CONNTYPE_TXT: case NSSW_CONNTYPE_BTN: // Connection type
   752 		case NSSW_CONNTYPE_BTN: // Connection type
   754 			ShowDropDownMenu(w, _connection_types_dropdown, _network_advertise, NSSW_CONNTYPE_BTN, 0, 0); // do it for widget NSSW_CONNTYPE_BTN
   753 			ShowDropDownMenu(w, _connection_types_dropdown, _network_advertise, NSSW_CONNTYPE_BTN, 0, 0); // do it for widget NSSW_CONNTYPE_BTN
   755 			break;
   754 			break;
   756 		case NSSW_CLIENTS_BTND:    case NSSW_CLIENTS_BTNU:    // Click on up/down button for number of clients
   755 		case NSSW_CLIENTS_BTND:    case NSSW_CLIENTS_BTNU:    // Click on up/down button for number of clients
   757 		case NSSW_COMPANIES_BTND:  case NSSW_COMPANIES_BTNU:  // Click on up/down button for number of companies
   756 		case NSSW_COMPANIES_BTND:  case NSSW_COMPANIES_BTNU:  // Click on up/down button for number of companies
   758 		case NSSW_SPECTATORS_BTND: case NSSW_SPECTATORS_BTNU: // Click on up/down button for number of spectators
   757 		case NSSW_SPECTATORS_BTND: case NSSW_SPECTATORS_BTNU: // Click on up/down button for number of spectators
   788 		case NSSW_SPECTATORS_TXT: // Click on number of spectators
   787 		case NSSW_SPECTATORS_TXT: // Click on number of spectators
   789 			nd->widget_id = NSSW_SPECTATORS_TXT;
   788 			nd->widget_id = NSSW_SPECTATORS_TXT;
   790 			SetDParam(0, _network_game_info.spectators_max);
   789 			SetDParam(0, _network_game_info.spectators_max);
   791 			ShowQueryString(STR_CONFIG_PATCHES_INT32, STR_NETWORK_NUMBER_OF_SPECTATORS, 3, 50, w, CS_NUMERAL);
   790 			ShowQueryString(STR_CONFIG_PATCHES_INT32, STR_NETWORK_NUMBER_OF_SPECTATORS, 3, 50, w, CS_NUMERAL);
   792 			break;
   791 			break;
   793 		case NSSW_LANGUAGE_TXT: case NSSW_LANGUAGE_BTN: { // Language
   792 		case NSSW_LANGUAGE_BTN: { // Language
   794 			uint sel = 0;
   793 			uint sel = 0;
   795 			for (uint i = 0; i < lengthof(_language_dropdown) - 1; i++) {
   794 			for (uint i = 0; i < lengthof(_language_dropdown) - 1; i++) {
   796 				if (_language_dropdown[i] == STR_NETWORK_LANG_ANY + _network_game_info.server_lang) {
   795 				if (_language_dropdown[i] == STR_NETWORK_LANG_ANY + _network_game_info.server_lang) {
   797 					sel = i;
   796 					sel = i;
   798 					break;
   797 					break;
   894 {      WWT_INSET,   RESIZE_NONE,   BGC,    10,   271,    62,   216, STR_NULL,                         STR_NETWORK_SELECT_MAP_TIP},           // NSSW_SELMAP
   893 {      WWT_INSET,   RESIZE_NONE,   BGC,    10,   271,    62,   216, STR_NULL,                         STR_NETWORK_SELECT_MAP_TIP},           // NSSW_SELMAP
   895 {  WWT_SCROLLBAR,   RESIZE_NONE,   BGC,   259,   270,    63,   215, 0x0,                              STR_0190_SCROLL_BAR_SCROLLS_LIST},
   894 {  WWT_SCROLLBAR,   RESIZE_NONE,   BGC,   259,   270,    63,   215, 0x0,                              STR_0190_SCROLL_BAR_SCROLLS_LIST},
   896 
   895 
   897 /* Combo/selection boxes to control Connection Type / Max Clients / Max Companies / Max Observers / Language */
   896 /* Combo/selection boxes to control Connection Type / Max Clients / Max Companies / Max Observers / Language */
   898 {       WWT_TEXT,   RESIZE_NONE,   BGC,   280,   419,    63,    75, STR_NETWORK_CONNECTION,           STR_NULL},
   897 {       WWT_TEXT,   RESIZE_NONE,   BGC,   280,   419,    63,    75, STR_NETWORK_CONNECTION,           STR_NULL},
   899 {      WWT_INSET,   RESIZE_NONE,   BGC,   280,   410,    77,    88, STR_NETWORK_LAN_INTERNET_COMBO,   STR_NETWORK_CONNECTION_TIP},           // NSSW_CONNTYPE_TXT
   898 { WWT_DROPDOWNIN,   RESIZE_NONE,   BGC,   280,   410,    77,    88, STR_NETWORK_LAN_INTERNET_COMBO,   STR_NETWORK_CONNECTION_TIP},           // NSSW_CONNTYPE_BTN
   900 {    WWT_TEXTBTN,   RESIZE_NONE,   BGC,   399,   409,    78,    87, STR_0225,                         STR_NETWORK_CONNECTION_TIP},           // NSSW_CONNTYPE_BTN
       
   901 
   899 
   902 {       WWT_TEXT,   RESIZE_NONE,   BGC,   280,   419,    95,   107, STR_NETWORK_NUMBER_OF_CLIENTS,    STR_NULL},
   900 {       WWT_TEXT,   RESIZE_NONE,   BGC,   280,   419,    95,   107, STR_NETWORK_NUMBER_OF_CLIENTS,    STR_NULL},
   903 {     WWT_IMGBTN,   RESIZE_NONE,   BGC,   280,   291,   109,   120, SPR_ARROW_DOWN,                   STR_NETWORK_NUMBER_OF_CLIENTS_TIP},    // NSSW_CLIENTS_BTND
   901 {     WWT_IMGBTN,   RESIZE_NONE,   BGC,   280,   291,   109,   120, SPR_ARROW_DOWN,                   STR_NETWORK_NUMBER_OF_CLIENTS_TIP},    // NSSW_CLIENTS_BTND
   904 { WWT_PUSHTXTBTN,   RESIZE_NONE,   BGC,   292,   397,   109,   120, STR_NETWORK_CLIENTS_SELECT,       STR_NETWORK_NUMBER_OF_CLIENTS_TIP},    // NSSW_CLIENTS_TXT
   902 { WWT_PUSHTXTBTN,   RESIZE_NONE,   BGC,   292,   397,   109,   120, STR_NETWORK_CLIENTS_SELECT,       STR_NETWORK_NUMBER_OF_CLIENTS_TIP},    // NSSW_CLIENTS_TXT
   905 {     WWT_IMGBTN,   RESIZE_NONE,   BGC,   398,   410,   109,   120, SPR_ARROW_UP,                     STR_NETWORK_NUMBER_OF_CLIENTS_TIP},    // NSSW_CLIENTS_BTNU
   903 {     WWT_IMGBTN,   RESIZE_NONE,   BGC,   398,   410,   109,   120, SPR_ARROW_UP,                     STR_NETWORK_NUMBER_OF_CLIENTS_TIP},    // NSSW_CLIENTS_BTNU
   913 {     WWT_IMGBTN,   RESIZE_NONE,   BGC,   280,   291,   173,   184, SPR_ARROW_DOWN,                   STR_NETWORK_NUMBER_OF_SPECTATORS_TIP}, // NSSW_SPECTATORS_BTND
   911 {     WWT_IMGBTN,   RESIZE_NONE,   BGC,   280,   291,   173,   184, SPR_ARROW_DOWN,                   STR_NETWORK_NUMBER_OF_SPECTATORS_TIP}, // NSSW_SPECTATORS_BTND
   914 { WWT_PUSHTXTBTN,   RESIZE_NONE,   BGC,   292,   397,   173,   184, STR_NETWORK_SPECTATORS_SELECT,    STR_NETWORK_NUMBER_OF_SPECTATORS_TIP}, // NSSW_SPECTATORS_TXT
   912 { WWT_PUSHTXTBTN,   RESIZE_NONE,   BGC,   292,   397,   173,   184, STR_NETWORK_SPECTATORS_SELECT,    STR_NETWORK_NUMBER_OF_SPECTATORS_TIP}, // NSSW_SPECTATORS_TXT
   915 {     WWT_IMGBTN,   RESIZE_NONE,   BGC,   398,   410,   173,   184, SPR_ARROW_UP,                     STR_NETWORK_NUMBER_OF_SPECTATORS_TIP}, // NSSW_SPECTATORS_BTNU
   913 {     WWT_IMGBTN,   RESIZE_NONE,   BGC,   398,   410,   173,   184, SPR_ARROW_UP,                     STR_NETWORK_NUMBER_OF_SPECTATORS_TIP}, // NSSW_SPECTATORS_BTNU
   916 
   914 
   917 {       WWT_TEXT,   RESIZE_NONE,   BGC,   280,   419,   191,   203, STR_NETWORK_LANGUAGE_SPOKEN,      STR_NULL},
   915 {       WWT_TEXT,   RESIZE_NONE,   BGC,   280,   419,   191,   203, STR_NETWORK_LANGUAGE_SPOKEN,      STR_NULL},
   918 {      WWT_INSET,   RESIZE_NONE,   BGC,   280,   410,   205,   216, STR_NETWORK_LANGUAGE_COMBO,       STR_NETWORK_LANGUAGE_TIP},             // NSSW_LANGUAGE_TXT
   916 { WWT_DROPDOWNIN,   RESIZE_NONE,   BGC,   280,   410,   205,   216, STR_NETWORK_LANGUAGE_COMBO,       STR_NETWORK_LANGUAGE_TIP},             // NSSW_LANGUAGE_BTN
   919 {    WWT_TEXTBTN,   RESIZE_NONE,   BGC,   399,   409,   206,   215, STR_0225,                         STR_NETWORK_LANGUAGE_TIP},             // NSSW_LANGUAGE_BTN
       
   920 
   917 
   921 /* Buttons Start / Load / Cancel */
   918 /* Buttons Start / Load / Cancel */
   922 { WWT_PUSHTXTBTN,   RESIZE_NONE,   BTC,    40,   140,   224,   235, STR_NETWORK_START_GAME,           STR_NETWORK_START_GAME_TIP},           // NSSW_START
   919 { WWT_PUSHTXTBTN,   RESIZE_NONE,   BTC,    40,   140,   224,   235, STR_NETWORK_START_GAME,           STR_NETWORK_START_GAME_TIP},           // NSSW_START
   923 { WWT_PUSHTXTBTN,   RESIZE_NONE,   BTC,   150,   250,   224,   235, STR_NETWORK_LOAD_GAME,            STR_NETWORK_LOAD_GAME_TIP},            // NSSW_LOAD
   920 { WWT_PUSHTXTBTN,   RESIZE_NONE,   BTC,   150,   250,   224,   235, STR_NETWORK_LOAD_GAME,            STR_NETWORK_LOAD_GAME_TIP},            // NSSW_LOAD
   924 { WWT_PUSHTXTBTN,   RESIZE_NONE,   BTC,   260,   360,   224,   235, STR_012E_CANCEL,                  STR_NULL},                             // NSSW_CANCEL
   921 { WWT_PUSHTXTBTN,   RESIZE_NONE,   BTC,   260,   360,   224,   235, STR_012E_CANCEL,                  STR_NULL},                             // NSSW_CANCEL