summaryrefslogtreecommitdiff
path: root/intro_gui.c
diff options
context:
space:
mode:
authorpasky <pasky@openttd.org>2005-04-02 12:45:12 +0000
committerpasky <pasky@openttd.org>2005-04-02 12:45:12 +0000
commit93ef61dfcc08e73c68e306af05684640f8692486 (patch)
tree2f40f5232cc1019f0819cec536b546f0a5ac94b8 /intro_gui.c
parentb4123cf945862b39ff8d36ee3176c93f7312a99d (diff)
downloadopenttd-93ef61dfcc08e73c68e306af05684640f8692486.tar.xz
(svn r2124) Final _select_game_widgets[] reordering, even landscape panels in place now.
Diffstat (limited to 'intro_gui.c')
-rw-r--r--intro_gui.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/intro_gui.c b/intro_gui.c
index 97ba66018..62eb03801 100644
--- a/intro_gui.c
+++ b/intro_gui.c
@@ -18,9 +18,8 @@ static void ShowSelectTutorialWindow()
}
*/
-/* We go from TOP to the BOTTOM and from LEFT to the RIGHT (scenario
- * panels are an exception). I know this is a highly unusual concept, guys,
- * but I hope you'll manage to follow. --pasky */
+/* We go from TOP to the BOTTOM and from LEFT to the RIGHT. I know this is
+ * a highly unusual concept, guys, but I hope you'll manage to follow. --pasky */
static const Widget _select_game_widgets[] = {
{ WWT_CAPTION, RESIZE_NONE, 13, 0, 335, 0, 13, STR_0307_OPENTTD, STR_NULL},
{ WWT_IMGBTN, RESIZE_NONE, 13, 0, 335, 14, 196, 0x0, STR_NULL},
@@ -28,16 +27,16 @@ static const Widget _select_game_widgets[] = {
{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325, 22, 33, STR_0141_LOAD_GAME, STR_02FC_LOAD_A_SAVED_GAME},
{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 10, 167, 40, 51, STR_0220_CREATE_SCENARIO,STR_02FE_CREATE_A_CUSTOMIZED_GAME},
{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325, 40, 51, STR_029A_PLAY_SCENARIO, STR_0303_START_A_NEW_GAME_USING},
+{ WWT_PANEL_2, RESIZE_NONE, 12, 10, 85, 69, 122, 0x1312, STR_030E_SELECT_TEMPERATE_LANDSCAPE},
+{ WWT_PANEL_2, RESIZE_NONE, 12, 90, 165, 69, 122, 0x1314, STR_030F_SELECT_SUB_ARCTIC_LANDSCAPE},
+{ WWT_PANEL_2, RESIZE_NONE, 12, 170, 245, 69, 122, 0x1316, STR_0310_SELECT_SUB_TROPICAL_LANDSCAPE},
+{ WWT_PANEL_2, RESIZE_NONE, 12, 250, 325, 69, 122, 0x1318, STR_0311_SELECT_TOYLAND_LANDSCAPE},
{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 10, 167, 136, 147, STR_SINGLE_PLAYER, STR_02FF_SELECT_SINGLE_PLAYER_GAME},
{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325, 136, 147, STR_MULTIPLAYER, STR_0300_SELECT_MULTIPLAYER_GAME},
{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 10, 167, 159, 170, STR_0148_GAME_OPTIONS, STR_0301_DISPLAY_GAME_OPTIONS},
{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325, 159, 170, STR_01FE_DIFFICULTY, STR_0302_DISPLAY_DIFFICULTY_OPTIONS},
{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 10, 167, 177, 188, STR_CONFIG_PATCHES, STR_CONFIG_PATCHES_TIP},
{ WWT_PUSHTXTBTN, RESIZE_NONE, 12, 168, 325, 177, 188, STR_0304_QUIT, STR_0305_QUIT_OPENTTD},
-{ WWT_PANEL_2, RESIZE_NONE, 12, 10, 85, 69, 122, 0x1312, STR_030E_SELECT_TEMPERATE_LANDSCAPE},
-{ WWT_PANEL_2, RESIZE_NONE, 12, 90, 165, 69, 122, 0x1314, STR_030F_SELECT_SUB_ARCTIC_LANDSCAPE},
-{ WWT_PANEL_2, RESIZE_NONE, 12, 170, 245, 69, 122, 0x1316, STR_0310_SELECT_SUB_TROPICAL_LANDSCAPE},
-{ WWT_PANEL_2, RESIZE_NONE, 12, 250, 325, 69, 122, 0x1318, STR_0311_SELECT_TOYLAND_LANDSCAPE},
{ WIDGETS_END },
};
@@ -47,7 +46,7 @@ extern void HandleOnEditTextCancel(void);
static void SelectGameWndProc(Window *w, WindowEvent *e) {
switch(e->event) {
case WE_PAINT:
- w->click_state = (w->click_state & ~(0xC0) & ~(0xF << 12)) | (1 << (_opt_newgame.landscape + 12)) | (1<<6);
+ w->click_state = (w->click_state & ~(1<<10) & ~(0xF << 6)) | (1 << (_opt_newgame.landscape + 6)) | (1<<10);
SetDParam(0, STR_6801_EASY + _opt_newgame.diff_level);
DrawWindowWidgets(w);
break;
@@ -58,23 +57,23 @@ static void SelectGameWndProc(Window *w, WindowEvent *e) {
case 3: ShowSaveLoadDialog(SLD_LOAD_GAME); break;
case 4: DoCommandP(0, InteractiveRandom(), 0, NULL, CMD_CREATE_SCENARIO); break;
case 5: ShowSaveLoadDialog(SLD_LOAD_SCENARIO); break;
- case 7:
- #ifdef ENABLE_NETWORK
+ case 6: case 7: case 8: case 9:
+ DoCommandP(0, e->click.widget - 6, 0, NULL, CMD_SET_NEW_LANDSCAPE_TYPE);
+ break;
+ case 11:
+#ifdef ENABLE_NETWORK
if (!_network_available) {
ShowErrorMessage(-1, STR_NETWORK_ERR_NOTAVAILABLE, 0, 0);
} else
ShowNetworkGameWindow();
- #else
+#else
ShowErrorMessage(-1 ,STR_NETWORK_ERR_NOTAVAILABLE, 0, 0);
- #endif /* ENABLE_NETWORK */
- break;
- case 8: ShowGameOptions(); break;
- case 9: ShowGameDifficulty(); break;
- case 10:ShowPatchesSelection(); break;
- case 11:AskExitGame(); break;
- case 12: case 13: case 14: case 15:
- DoCommandP(0, e->click.widget - 12, 0, NULL, CMD_SET_NEW_LANDSCAPE_TYPE);
+#endif
break;
+ case 12: ShowGameOptions(); break;
+ case 13: ShowGameDifficulty(); break;
+ case 14: ShowPatchesSelection(); break;
+ case 15: AskExitGame(); break;
}
break;