diff options
author | rubidium <rubidium@openttd.org> | 2009-01-17 16:53:32 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-17 16:53:32 +0000 |
commit | 3a13b75e37b5642de3c1e89cf6ab3bf860b76375 (patch) | |
tree | 76215ba6e27bc0b1f49919c01ff2608f276b8e3d /src/intro_gui.cpp | |
parent | 2850bf9e006ebdd40b5562cca5117bca027cfab5 (diff) | |
download | openttd-3a13b75e37b5642de3c1e89cf6ab3bf860b76375.tar.xz |
(svn r15126) -Feature: downloading content from a central server (content.openttd.org) where authors can upload they NewGRFS/AI etc. This should make joining servers that use only NewGRFs that are distributed via this system easier as the players can download the NewGRFs from in the game. It should also make it easier to see whether there are updates for NewGRFs and make the necessary updates.
Diffstat (limited to 'src/intro_gui.cpp')
-rw-r--r-- | src/intro_gui.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp index 6cd94aa00..a2f5136ea 100644 --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -12,6 +12,7 @@ #include "heightmap.h" #include "genworld.h" #include "network/network_gui.h" +#include "network/network_content.h" #include "newgrf.h" #include "strings_func.h" #include "window_func.h" @@ -24,8 +25,8 @@ #include "table/sprites.h" static const Widget _select_game_widgets[] = { -{ WWT_CAPTION, RESIZE_NONE, COLOUR_BROWN, 0, 335, 0, 13, STR_0307_OPENTTD, STR_NULL}, -{ WWT_PANEL, RESIZE_NONE, COLOUR_BROWN, 0, 335, 14, 194, 0x0, STR_NULL}, +{ WWT_CAPTION, RESIZE_NONE, COLOUR_BROWN, 0, 335, 0, 13, STR_0307_OPENTTD, STR_NULL}, +{ WWT_PANEL, RESIZE_NONE, COLOUR_BROWN, 0, 335, 14, 194, 0x0, STR_NULL}, { WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_ORANGE, 10, 167, 22, 33, STR_0140_NEW_GAME, STR_02FB_START_A_NEW_GAME}, { WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_ORANGE, 168, 325, 22, 33, STR_0141_LOAD_GAME, STR_02FC_LOAD_A_SAVED_GAME}, { WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_ORANGE, 10, 167, 40, 51, STR_029A_PLAY_SCENARIO, STR_0303_START_A_NEW_GAME_USING}, @@ -43,7 +44,8 @@ static const Widget _select_game_widgets[] = { { WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_ORANGE, 10, 167, 157, 168, STR_CONFIG_PATCHES, STR_CONFIG_PATCHES_TIP}, { WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_ORANGE, 168, 325, 157, 168, STR_NEWGRF_SETTINGS_BUTTON, STR_NULL}, -{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_ORANGE, 104, 231, 175, 186, STR_0304_QUIT, STR_0305_QUIT_OPENTTD}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_ORANGE, 10, 167, 175, 186, STR_CONTENT_INTRO_BUTTON, STR_CONTENT_INTRO_BUTTON_TIP}, +{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_ORANGE, 168, 325, 175, 186, STR_0304_QUIT, STR_0305_QUIT_OPENTTD}, { WIDGETS_END}, }; @@ -70,6 +72,7 @@ private: SGI_DIFFICULTIES, SGI_PATCHES_OPTIONS, SGI_GRF_SETTINGS, + SGI_CONTENT_DOWNLOAD, SGI_EXIT, }; @@ -123,6 +126,14 @@ public: case SGI_DIFFICULTIES: ShowGameDifficulty(); break; case SGI_PATCHES_OPTIONS: ShowPatchesSelection(); break; case SGI_GRF_SETTINGS: ShowNewGRFSettings(true, true, false, &_grfconfig_newgame); break; + case SGI_CONTENT_DOWNLOAD: + if (!_network_available) { + ShowErrorMessage(INVALID_STRING_ID, STR_NETWORK_ERR_NOTAVAILABLE, 0, 0); + } else { + ShowNetworkContentListWindow(); + } + break; + case SGI_EXIT: HandleExitGameRequest(); break; } } |