summaryrefslogtreecommitdiff
path: root/network_gui.c
diff options
context:
space:
mode:
authorludde <ludde@openttd.org>2005-07-15 15:09:52 +0000
committerludde <ludde@openttd.org>2005-07-15 15:09:52 +0000
commita069876725080c783a7def816081867a2574d3a0 (patch)
tree37eff27994a6fc0a501ac19e29cb3cefde9dc65b /network_gui.c
parent2fa79c9b4d140f78e5e6392aded7beebeec5c230 (diff)
downloadopenttd-a069876725080c783a7def816081867a2574d3a0.tar.xz
(svn r2573) Codechange: Removed WDF_RESTORE_DPARAM, it's not needed with the new string system.
Also fixed a bug introduced in r2564, forgot to remove 4 global variables in network_gui.c.
Diffstat (limited to 'network_gui.c')
-rw-r--r--network_gui.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/network_gui.c b/network_gui.c
index 0f33962d2..e1dad6e8c 100644
--- a/network_gui.c
+++ b/network_gui.c
@@ -43,8 +43,6 @@ static const StringID _lan_internet_types_dropdown[] = {
INVALID_STRING_ID
};
-static StringID _str_map_name, _str_game_name, _str_server_version, _str_server_address;
-
enum {
NET_PRC__OFFSET_TOP_WIDGET = 74,
NET_PRC__OFFSET_TOP_WIDGET_COMPANY = 42,
@@ -181,7 +179,7 @@ static void NetworkGameWindowWndProc(Window *w, WindowEvent *e)
if (_selected_item == NULL) {
DrawStringMultiCenter(365, 40, STR_NETWORK_GAME_INFO, 0);
} else if (!_selected_item->online) {
- SetDParam(0, _str_game_name);
+ SetDParamStr(0, _selected_item->info.server_name);
DrawStringMultiCenter(365, 42, STR_ORANGE, 2); // game name
DrawStringMultiCenter(365, 110, STR_NETWORK_SERVER_OFFLINE, 2); // server offline
@@ -397,7 +395,7 @@ static const Widget _network_game_window_widgets[] = {
static const WindowDesc _network_game_window_desc = {
WDP_CENTER, WDP_CENTER, 490, 215,
WC_NETWORK_WINDOW,0,
- WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESTORE_DPARAM,
+ WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
_network_game_window_widgets,
NetworkGameWindowWndProc,
};
@@ -624,7 +622,7 @@ static const Widget _network_start_server_window_widgets[] = {
static const WindowDesc _network_start_server_window_desc = {
WDP_CENTER, WDP_CENTER, 420, 200,
WC_NETWORK_WINDOW,0,
- WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESTORE_DPARAM,
+ WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
_network_start_server_window_widgets,
NetworkStartServerWindowWndProc,
};
@@ -681,7 +679,7 @@ static void NetworkLobbyWindowWndProc(Window *w, WindowEvent *e)
DrawWindowWidgets(w);
- SetDParam(0, _str_game_name);
+ SetDParamStr(0, _selected_item->info.server_name);
DrawString(10, 22, STR_NETWORK_PREPARE_TO_JOIN, 2);
// draw company list