diff options
author | rubidium <rubidium@openttd.org> | 2009-03-15 15:12:06 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-03-15 15:12:06 +0000 |
commit | f9def73be628b8298eb9164ebdf5d0d77f30b106 (patch) | |
tree | 66a1daaed45d405317364932c5184ead15c023d4 /src/network | |
parent | e9ae5ae307d3f4064a46175f4f66ca6a372f5578 (diff) | |
download | openttd-f9def73be628b8298eb9164ebdf5d0d77f30b106.tar.xz |
(svn r15723) -Codechange: use a constructor for WindowDescs as that makes expanding them much easier (Alberth)
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_chat_gui.cpp | 6 | ||||
-rw-r--r-- | src/network/network_content_gui.cpp | 12 | ||||
-rw-r--r-- | src/network/network_gui.cpp | 36 |
3 files changed, 27 insertions, 27 deletions
diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index 64178e8df..fc77b56c6 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -501,12 +501,12 @@ static const Widget _chat_window_widgets[] = { { WIDGETS_END}, }; -static const WindowDesc _chat_window_desc = { +static const WindowDesc _chat_window_desc( WDP_CENTER, -26, 320, 14, 640, 14, // x, y, width, height WC_SEND_NETWORK_MSG, WC_NONE, WDF_STD_TOOLTIPS | WDF_DEF_WIDGET, - _chat_window_widgets, -}; + _chat_window_widgets +); void ShowNetworkChatQueryWindow(DestType type, int dest) { diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index dd9e8f707..1e052fb79 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -28,12 +28,12 @@ static const Widget _network_content_download_status_window_widget[] = { }; /** Window description for the download window */ -static const WindowDesc _network_content_download_status_window_desc = { +static const WindowDesc _network_content_download_status_window_desc( WDP_CENTER, WDP_CENTER, 350, 85, 350, 85, WC_NETWORK_STATUS_WINDOW, WC_NONE, WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_MODAL, - _network_content_download_status_window_widget, -}; + _network_content_download_status_window_widget +); /** Window for showing the download status of content */ struct NetworkContentDownloadStatusWindow : public Window, ContentCallback { @@ -760,12 +760,12 @@ static const Widget _network_content_list_widgets[] = { }; /** Window description of the content list */ -static const WindowDesc _network_content_list_desc = { +static const WindowDesc _network_content_list_desc( WDP_CENTER, WDP_CENTER, 450, 278, 630, 460, WC_NETWORK_WINDOW, WC_NONE, WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE, - _network_content_list_widgets, -}; + _network_content_list_widgets +); /** * Show the content list window with a given set of content diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 8cb514813..e33b2b2a7 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -811,12 +811,12 @@ static const Widget _network_game_window_widgets[] = { { WIDGETS_END}, }; -static const WindowDesc _network_game_window_desc = { +static const WindowDesc _network_game_window_desc( WDP_CENTER, WDP_CENTER, 450, 264, 780, 264, WC_NETWORK_WINDOW, WC_NONE, WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE, - _network_game_window_widgets, -}; + _network_game_window_widgets +); void ShowNetworkGameWindow() { @@ -1135,12 +1135,12 @@ static const Widget _network_start_server_window_widgets[] = { { WIDGETS_END}, }; -static const WindowDesc _network_start_server_window_desc = { +static const WindowDesc _network_start_server_window_desc( WDP_CENTER, WDP_CENTER, 420, 244, 420, 244, WC_NETWORK_WINDOW, WC_NONE, WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS, - _network_start_server_window_widgets, -}; + _network_start_server_window_widgets +); static void ShowNetworkStartServerWindow() { @@ -1361,12 +1361,12 @@ static const Widget _network_lobby_window_widgets[] = { { WIDGETS_END}, }; -static const WindowDesc _network_lobby_window_desc = { +static const WindowDesc _network_lobby_window_desc( WDP_CENTER, WDP_CENTER, 420, 235, 420, 235, WC_NETWORK_WINDOW, WC_NONE, WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS, - _network_lobby_window_widgets, -}; + _network_lobby_window_widgets +); /* Show the networklobbywindow with the selected server * @param ngl Selected game pointer which is passed to the new window */ @@ -1422,12 +1422,12 @@ static const Widget _client_list_popup_widgets[] = { { WIDGETS_END}, }; -static const WindowDesc _client_list_desc = { +static const WindowDesc _client_list_desc( WDP_AUTO, WDP_AUTO, 250, 1, 250, 1, WC_CLIENT_LIST, WC_NONE, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, - _client_list_widgets, -}; + _client_list_widgets +); /* Finds the Xth client-info that is active */ static const NetworkClientInfo *NetworkFindClientInfo(byte client_no) @@ -1847,12 +1847,12 @@ static const Widget _network_join_status_window_widget[] = { { WIDGETS_END}, }; -static const WindowDesc _network_join_status_window_desc = { +static const WindowDesc _network_join_status_window_desc( WDP_CENTER, WDP_CENTER, 250, 85, 250, 85, WC_NETWORK_STATUS_WINDOW, WC_NONE, WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_MODAL, - _network_join_status_window_widget, -}; + _network_join_status_window_widget +); void ShowJoinStatusWindow() { @@ -1960,12 +1960,12 @@ static const Widget _ncp_window_widgets[] = { { WIDGETS_END}, }; -static const WindowDesc _ncp_window_desc = { +static const WindowDesc _ncp_window_desc( WDP_AUTO, WDP_AUTO, 300, 63, 300, 63, WC_COMPANY_PASSWORD_WINDOW, WC_NONE, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON, - _ncp_window_widgets, -}; + _ncp_window_widgets +); void ShowNetworkCompanyPasswordWindow(Window *parent) { |