Changeset - r13631:e0c4e0de0eea
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-11-18 12:31:48
rubidium@openttd.org
(svn r18165) -Codechange: make company dropdowns RTL aware
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/toolbar_gui.cpp
Show inline comments
 
@@ -162,11 +162,12 @@ public:
 
	void Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const
 
	{
 
		CompanyID company = (CompanyID)result;
 
		bool rtl = _dynlang.text_dir == TD_RTL;
 

	
 
		/* It's possible the company is deleted while the dropdown is open */
 
		if (!Company::IsValidID(company)) return;
 

	
 
		DrawCompanyIcon(company, left + 2, top + 1);
 
		DrawCompanyIcon(company, rtl ? right - 16 : left + 2, top + 1);
 

	
 
		SetDParam(0, company);
 
		SetDParam(1, company);
 
@@ -176,7 +177,7 @@ public:
 
		} else {
 
			col = sel ? TC_WHITE : TC_BLACK;
 
		}
 
		DrawString(left + 19, right - 2, top, STR_COMPANY_NAME_COMPANY_NUM, col);
 
		DrawString(rtl ? left + 2 : left + 19, rtl ? right - 19 : right - 2, top, STR_COMPANY_NAME_COMPANY_NUM, col);
 
	}
 
};
 

	
0 comments (0 inline, 0 general)