src/town_gui.cpp
branchgamebalance
changeset 9895 7bd07f43b0e3
parent 9891 7d3a5979a733
child 9898 324dad59eb35
equal deleted inserted replaced
9894:70d78ac95d6c 9895:7bd07f43b0e3
   430 	int r = (ta->GetActivity() * 100 * ta->population) - (tb->GetActivity() * 100 * tb->population);
   430 	int r = (ta->GetActivity() * 100 * ta->population) - (tb->GetActivity() * 100 * tb->population);
   431 	if (_town_sort_order & 1) r = -r;
   431 	if (_town_sort_order & 1) r = -r;
   432 	return r;
   432 	return r;
   433 }
   433 }
   434 
   434 
   435 static void MakeSortedTownList(void)
   435 static void MakeSortedTownList()
   436 {
   436 {
   437 	const Town* t;
   437 	const Town* t;
   438 	int (*townsortproc[])(const void *a, const void *b) = {
   438 	int (*townsortproc[])(const void *a, const void *b) = {
   439 		TownNameSorter, TownPopSorter, TownGDPSorter, TownOutputSorter
   439 		TownNameSorter, TownPopSorter, TownGDPSorter, TownOutputSorter
   440 	};
   440 	};
   541 	_town_directory_widgets,
   541 	_town_directory_widgets,
   542 	TownDirectoryWndProc
   542 	TownDirectoryWndProc
   543 };
   543 };
   544 
   544 
   545 
   545 
   546 void ShowTownDirectory(void)
   546 void ShowTownDirectory()
   547 {
   547 {
   548 	Window *w = AllocateWindowDescFront(&_town_directory_desc, 0);
   548 	Window *w = AllocateWindowDescFront(&_town_directory_desc, 0);
   549 
   549 
   550 	if (w != NULL) {
   550 	if (w != NULL) {
   551 		w->vscroll.cap = 16;
   551 		w->vscroll.cap = 16;