File diff r23519:04e2cd195801 → r23520:20bbc807b0eb
src/settings_gui.cpp
Show inline comments
 
@@ -215,7 +215,7 @@ struct GameOptionsWindow : Window {
 
					if (i == CURRENCY_CUSTOM) continue;
 
					*list->Append() = new DropDownListStringItem(*items, i, HasBit(disabled, i));
 
				}
 
				QSortT(list->Begin(), list->Length(), DropDownListStringItem::NatSortFunc);
 
				QSortT(list->Begin(), list->size(), DropDownListStringItem::NatSortFunc);
 

	
 
				/* Append custom currency at the end */
 
				*list->Append() = new DropDownListItem(-1, false); // separator line
 
@@ -253,9 +253,9 @@ struct GameOptionsWindow : Window {
 
					int result = _nb_orig_names + i;
 
					*list->Append() = new DropDownListStringItem(_grf_names[i], result, enabled_item != result && enabled_item >= 0);
 
				}
 
				QSortT(list->Begin(), list->Length(), DropDownListStringItem::NatSortFunc);
 
				QSortT(list->Begin(), list->size(), DropDownListStringItem::NatSortFunc);
 

	
 
				int newgrf_size = list->Length();
 
				int newgrf_size = list->size();
 
				/* Insert newgrf_names at the top of the list */
 
				if (newgrf_size > 0) {
 
					*list->Append() = new DropDownListItem(-1, false); // separator line
 
@@ -266,7 +266,7 @@ struct GameOptionsWindow : Window {
 
				for (int i = 0; i < _nb_orig_names; i++) {
 
					*list->Append() = new DropDownListStringItem(STR_GAME_OPTIONS_TOWN_NAME_ORIGINAL_ENGLISH + i, i, enabled_item != i && enabled_item >= 0);
 
				}
 
				QSortT(list->Begin() + newgrf_size, list->Length() - newgrf_size, DropDownListStringItem::NatSortFunc);
 
				QSortT(list->Begin() + newgrf_size, list->size() - newgrf_size, DropDownListStringItem::NatSortFunc);
 
				break;
 
			}
 

	
 
@@ -282,11 +282,11 @@ struct GameOptionsWindow : Window {
 

	
 
			case WID_GO_LANG_DROPDOWN: { // Setup interface language dropdown
 
				list = new DropDownList();
 
				for (uint i = 0; i < _languages.Length(); i++) {
 
				for (uint i = 0; i < _languages.size(); i++) {
 
					if (&_languages[i] == _current_language) *selected_index = i;
 
					*list->Append() = new DropDownListStringItem(SPECSTR_LANGUAGE_START + i, i, false);
 
				}
 
				QSortT(list->Begin(), list->Length(), DropDownListStringItem::NatSortFunc);
 
				QSortT(list->Begin(), list->size(), DropDownListStringItem::NatSortFunc);
 
				break;
 
			}