diff options
author | smatz <smatz@openttd.org> | 2009-11-24 21:18:11 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-11-24 21:18:11 +0000 |
commit | f0c64208cf917ff2a1f59c7640eac7e9fb80d605 (patch) | |
tree | 46ff00e56156495fa95821a99cf4f3d00a0acb49 /src/toolbar_gui.cpp | |
parent | 8d6e323ef80fcb49c4fc8417564d1e2ef7797a73 (diff) | |
download | openttd-f0c64208cf917ff2a1f59c7640eac7e9fb80d605.tar.xz |
(svn r18281) -Feature: founding towns in-game (based on work by Belugas, TheJosh, GeekToo, Terkhen and others)
Diffstat (limited to 'src/toolbar_gui.cpp')
-rw-r--r-- | src/toolbar_gui.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 369a532e0..8c258db74 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -405,12 +405,17 @@ static void MenuClickMap(int index) static void ToolbarTownClick(Window *w) { - PopupMainToolbMenu(w, TBN_TOWNDIRECTORY, STR_TOWN_MENU_TOWN_DIRECTORY, 1); + PopupMainToolbMenu(w, TBN_TOWNDIRECTORY, STR_TOWN_MENU_TOWN_DIRECTORY, (_settings_game.economy.found_town == TF_FORBIDDEN) ? 1 : 2); } static void MenuClickTown(int index) { - ShowTownDirectory(); + switch (index) { + case 0: ShowTownDirectory(); break; + case 1: // setting could be changed when the dropdown was open + if (_settings_game.economy.found_town != TF_FORBIDDEN) ShowFoundTownWindow(); + break; + } } /* --- Subidies button menu --- */ |