Changeset - r14914:6daaca116c6d
[Not reviewed]
master
0 1 0
terkhen - 14 years ago 2010-03-28 12:29:41
terkhen@openttd.org
(svn r19522) -Feature: Sort industries alphabetically at the fund new industry window.
1 file changed with 7 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/industry_gui.cpp
Show inline comments
 
@@ -217,7 +217,8 @@ class BuildIndustryWindow : public Windo
 
		 * The tests performed after the enabled allow to load the industries
 
		 * In the same way they are inserted by grf (if any)
 
		 */
 
		for (IndustryType ind = 0; ind < NUM_INDUSTRYTYPES; ind++) {
 
		for (uint8 i = 0; i < NUM_INDUSTRYTYPES; i++) {
 
			IndustryType ind = _sorted_industry_types[i];
 
			const IndustrySpec *indsp = GetIndustrySpec(ind);
 
			if (indsp->enabled) {
 
				/* Rule is that editor mode loads all industries.
 
@@ -254,14 +255,16 @@ public:
 
		this->selected_index = -1;
 
		this->selected_type = INVALID_INDUSTRYTYPE;
 

	
 
		/* Initialize arrays */
 
		this->SetupArrays();
 

	
 
		this->callback_timer = DAY_TICKS;
 

	
 
		this->InitNested(&_build_industry_desc, 0);
 
	}
 

	
 
	virtual void OnInit()
 
	{
 
		this->SetupArrays();
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
 
	{
 
		switch (widget) {
0 comments (0 inline, 0 general)