network_gui.c
changeset 534 306bc86eb23e
parent 507 04b5403aaf6b
child 543 946badd71033
equal deleted inserted replaced
533:404f9e37bff1 534:306bc86eb23e
    45 static void NetworkGameWindowWndProc(Window *w, WindowEvent *e)
    45 static void NetworkGameWindowWndProc(Window *w, WindowEvent *e)
    46 {
    46 {
    47 	switch(e->event) {
    47 	switch(e->event) {
    48 	case WE_PAINT: {
    48 	case WE_PAINT: {
    49 
    49 
    50 		SET_DPARAM16(0, 0x00);
    50 		SetDParam(0, 0x00);
    51 		SET_DPARAM16(2, STR_NETWORK_LAN + _network_connection);
    51 		SetDParam(2, STR_NETWORK_LAN + _network_connection);
    52 		DrawWindowWidgets(w);
    52 		DrawWindowWidgets(w);
    53 
    53 
    54 		DrawEditBox(w, 6);
    54 		DrawEditBox(w, 6);
    55 
    55 
    56 		DrawString(9, 43, STR_NETWORK_PLAYER_NAME, 2);
    56 		DrawString(9, 43, STR_NETWORK_PLAYER_NAME, 2);
    68 				if (cur_item == selected_item)
    68 				if (cur_item == selected_item)
    69 					GfxFillRect(11, y - 2, 380, y + 9, 10); // show highlighted item with a different colour
    69 					GfxFillRect(11, y - 2, 380, y + 9, 10); // show highlighted item with a different colour
    70 
    70 
    71 				DoDrawString(cur_item->item.server_name, 15, y, 16); // server name
    71 				DoDrawString(cur_item->item.server_name, 15, y, 16); // server name
    72 
    72 
    73 				SET_DPARAM8(0, cur_item->item.players_on);
    73 				SetDParam(0, cur_item->item.players_on);
    74 				SET_DPARAM8(1, cur_item->item.players_max);
    74 				SetDParam(1, cur_item->item.players_max);
    75 				DrawString(238, y, STR_NETWORK_PLAYERS_VAL, 2); // #/#
    75 				DrawString(238, y, STR_NETWORK_PLAYERS_VAL, 2); // #/#
    76 
    76 
    77 				DoDrawString(cur_item->item.map_name, 288, y, 16); // map size
    77 				DoDrawString(cur_item->item.map_name, 288, y, 16); // map size
    78 				cur_item = cur_item->_next;
    78 				cur_item = cur_item->_next;
    79 				y += NET_PRC__SIZE_OF_ROW;
    79 				y += NET_PRC__SIZE_OF_ROW;
   266 static void NetworkStartServerWindowWndProc(Window *w, WindowEvent *e)
   266 static void NetworkStartServerWindowWndProc(Window *w, WindowEvent *e)
   267 {
   267 {
   268 	switch(e->event) {
   268 	switch(e->event) {
   269 	case WE_PAINT: {
   269 	case WE_PAINT: {
   270 
   270 
   271 		SET_DPARAM16(7, STR_NETWORK_2_PLAYERS + _players_max);
   271 		SetDParam(7, STR_NETWORK_2_PLAYERS + _players_max);
   272 		DrawWindowWidgets(w);
   272 		DrawWindowWidgets(w);
   273 
   273 
   274 		GfxFillRect(11, 63, 237, 168, 0xD7);
   274 		GfxFillRect(11, 63, 237, 168, 0xD7);
   275 
   275 
   276 		DrawEditBox(w, 3);
   276 		DrawEditBox(w, 3);
   387 static void NetworkLobbyWindowWndProc(Window *w, WindowEvent *e)
   387 static void NetworkLobbyWindowWndProc(Window *w, WindowEvent *e)
   388 {
   388 {
   389 	switch(e->event) {
   389 	switch(e->event) {
   390 	case WE_PAINT: {
   390 	case WE_PAINT: {
   391 
   391 
   392 		SET_DPARAM16(7, STR_NETWORK_2_PLAYERS + _opt_mod_ptr->road_side);
   392 		SetDParam(7, STR_NETWORK_2_PLAYERS + _opt_mod_ptr->road_side);
   393 		DrawWindowWidgets(w);
   393 		DrawWindowWidgets(w);
   394 
   394 
   395 		GfxFillRect( 11,  31, 239, 239, 0xD7);
   395 		GfxFillRect( 11,  31, 239, 239, 0xD7);
   396 		GfxFillRect(261,  31, 378, 220, 0xD7);
   396 		GfxFillRect(261,  31, 378, 220, 0xD7);
   397 
   397