diff options
author | rubidium <rubidium@openttd.org> | 2008-12-05 22:46:39 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-12-05 22:46:39 +0000 |
commit | 1ce8df9dac1a0a0daa773fba1b6c48a6f2b08541 (patch) | |
tree | 609bbaf3a99efe35366603e19a4cff9845e7bc31 | |
parent | 3118413269341570885cee4a5c04d26c24f8c8d8 (diff) | |
download | openttd-1ce8df9dac1a0a0daa773fba1b6c48a6f2b08541.tar.xz |
(svn r14658) -Change: allow changing town names when there are no towns in the scenario yet.
-rw-r--r-- | src/settings_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index dc197374d..b6e060ce1 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -134,7 +134,7 @@ static void ShowTownnameDropdown(Window *w, int sel) DropDownList *list = new DropDownList(); for (TownList::iterator it = townnames.begin(); it != townnames.end(); it++) { - list->push_back(new DropDownListStringItem((*it).first, (*it).second, !(_game_mode == GM_MENU || (*it).second == sel))); + list->push_back(new DropDownListStringItem((*it).first, (*it).second, !(_game_mode == GM_MENU || GetNumTowns() == 0 || (*it).second == sel))); } ShowDropDownList(w, list, sel, GAMEOPT_TOWNNAME_BTN); @@ -283,7 +283,7 @@ struct GameOptionsWindow : Window { break; case GAMEOPT_TOWNNAME_BTN: // Town names - if (_game_mode == GM_MENU) { + if (_game_mode == GM_MENU || GetNumTowns() == 0) { this->opt->game_creation.town_name = index; InvalidateWindow(WC_GAME_OPTIONS, 0); } |