File diff r16856:c4008a555a45 → r16857:43d6cf775e19
src/graph_gui.cpp
Show inline comments
 
@@ -1157,13 +1157,13 @@ private:
 
		this->companies.RebuildDone();
 
	}
 

	
 
	/** Sort the company league by performance history */
 
	static int CDECL PerformanceSorter(const Company * const *c1, const Company * const *c2)
 
	{
 
		return (*c2)->old_economy[1].performance_history - (*c1)->old_economy[1].performance_history;
 
		return (*c2)->old_economy[0].performance_history - (*c1)->old_economy[0].performance_history;
 
	}
 

	
 
public:
 
	CompanyLeagueWindow(const WindowDesc *desc, WindowNumber window_number) : Window()
 
	{
 
		this->InitNested(desc, window_number);
 
@@ -1198,13 +1198,13 @@ public:
 
			DrawString(ordinal_left, ordinal_right, y, i + STR_ORDINAL_NUMBER_1ST, i == 0 ? TC_WHITE : TC_YELLOW);
 

	
 
			DrawCompanyIcon(c->index, icon_left, y + icon_y_offset);
 

	
 
			SetDParam(0, c->index);
 
			SetDParam(1, c->index);
 
			SetDParam(2, GetPerformanceTitleFromValue(c->old_economy[1].performance_history));
 
			SetDParam(2, GetPerformanceTitleFromValue(c->old_economy[0].performance_history));
 
			DrawString(text_left, text_right, y, STR_COMPANY_LEAGUE_COMPANY_NAME);
 
			y += FONT_HEIGHT_NORMAL;
 
		}
 
	}
 

	
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)