summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-01-20 03:11:14 +0000
committerbelugas <belugas@openttd.org>2008-01-20 03:11:14 +0000
commit90a770250fa636203ed696d4bafeeb6866474693 (patch)
tree1cbc6e9ca547fef7b349afc8a575a1084013d959
parente91230415d37882176da2e9bf5f863779b3db745 (diff)
downloadopenttd-90a770250fa636203ed696d4bafeeb6866474693.tar.xz
(svn r11930) -Codechange: a bit of code style application
-rw-r--r--src/intro_gui.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp
index e1ad8599b..bafa736e5 100644
--- a/src/intro_gui.cpp
+++ b/src/intro_gui.cpp
@@ -55,48 +55,48 @@ static inline void SetNewLandscapeType(byte landscape)
static void SelectGameWndProc(Window *w, WindowEvent *e)
{
switch (e->event) {
- case WE_CREATE: w->LowerWidget(_opt_newgame.landscape + 8); break;
-
- case WE_PAINT:
- w->SetWidgetLoweredState(8, _opt_newgame.landscape == LT_TEMPERATE);
- w->SetWidgetLoweredState(9, _opt_newgame.landscape == LT_ARCTIC);
- w->SetWidgetLoweredState(10, _opt_newgame.landscape == LT_TROPIC);
- w->SetWidgetLoweredState(11, _opt_newgame.landscape == LT_TOYLAND);
- SetDParam(0, STR_6801_EASY + _opt_newgame.diff_level);
- DrawWindowWidgets(w);
- break;
-
- case WE_CLICK:
+ case WE_CREATE: w->LowerWidget(_opt_newgame.landscape + 8); break;
+
+ case WE_PAINT:
+ w->SetWidgetLoweredState(8, _opt_newgame.landscape == LT_TEMPERATE);
+ w->SetWidgetLoweredState(9, _opt_newgame.landscape == LT_ARCTIC);
+ w->SetWidgetLoweredState(10, _opt_newgame.landscape == LT_TROPIC);
+ w->SetWidgetLoweredState(11, _opt_newgame.landscape == LT_TOYLAND);
+ SetDParam(0, STR_6801_EASY + _opt_newgame.diff_level);
+ DrawWindowWidgets(w);
+ break;
+
+ case WE_CLICK:
#ifdef ENABLE_NETWORK
- /* Do not create a network server when you (just) have closed one of the game
- * creation/load windows for the network server. */
- if (2 <= e->we.click.widget && e->we.click.widget <= 6) _is_network_server = false;
+ /* Do not create a network server when you (just) have closed one of the game
+ * creation/load windows for the network server. */
+ if (2 <= e->we.click.widget && e->we.click.widget <= 6) _is_network_server = false;
#endif /* ENABLE_NETWORK */
- switch (e->we.click.widget) {
- case 2: ShowGenerateLandscape(); break;
- case 3: ShowSaveLoadDialog(SLD_LOAD_GAME); break;
- case 4: ShowSaveLoadDialog(SLD_LOAD_SCENARIO); break;
- case 5: ShowSaveLoadDialog(SLD_LOAD_HEIGHTMAP); break;
- case 6: StartScenarioEditor(); break;
- case 7:
- if (!_network_available) {
- ShowErrorMessage(INVALID_STRING_ID, STR_NETWORK_ERR_NOTAVAILABLE, 0, 0);
- } else {
- ShowNetworkGameWindow();
+ switch (e->we.click.widget) {
+ case 2: ShowGenerateLandscape(); break;
+ case 3: ShowSaveLoadDialog(SLD_LOAD_GAME); break;
+ case 4: ShowSaveLoadDialog(SLD_LOAD_SCENARIO); break;
+ case 5: ShowSaveLoadDialog(SLD_LOAD_HEIGHTMAP); break;
+ case 6: StartScenarioEditor(); break;
+ case 7:
+ if (!_network_available) {
+ ShowErrorMessage(INVALID_STRING_ID, STR_NETWORK_ERR_NOTAVAILABLE, 0, 0);
+ } else {
+ ShowNetworkGameWindow();
+ }
+ break;
+ case 8: case 9: case 10: case 11:
+ w->RaiseWidget(_opt_newgame.landscape + 8);
+ SetNewLandscapeType(e->we.click.widget - 8);
+ break;
+ case 12: ShowGameOptions(); break;
+ case 13: ShowGameDifficulty(); break;
+ case 14: ShowPatchesSelection(); break;
+ case 15: ShowNewGRFSettings(true, true, false, &_grfconfig_newgame); break;
+ case 16: HandleExitGameRequest(); break;
}
break;
- case 8: case 9: case 10: case 11:
- w->RaiseWidget(_opt_newgame.landscape + 8);
- SetNewLandscapeType(e->we.click.widget - 8);
- break;
- case 12: ShowGameOptions(); break;
- case 13: ShowGameDifficulty(); break;
- case 14: ShowPatchesSelection(); break;
- case 15: ShowNewGRFSettings(true, true, false, &_grfconfig_newgame); break;
- case 16: HandleExitGameRequest(); break;
- }
- break;
}
}