mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(svn r18305) -Codechange: Replace some 2s with WD_FRAMERECT_(LEFT|RIGHT).
This commit is contained in:
parent
5dc2e2831d
commit
a37ca47882
@ -127,9 +127,9 @@ public:
|
|||||||
void Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const
|
void Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const
|
||||||
{
|
{
|
||||||
if (checked) {
|
if (checked) {
|
||||||
DrawString(left + 2, right - 2, top, STR_JUST_CHECKMARK, sel ? TC_WHITE : TC_BLACK);
|
DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, STR_JUST_CHECKMARK, sel ? TC_WHITE : TC_BLACK);
|
||||||
}
|
}
|
||||||
DrawString(left + 2, right - 2, top, this->String(), sel ? TC_WHITE : TC_BLACK);
|
DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, this->String(), sel ? TC_WHITE : TC_BLACK);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ public:
|
|||||||
/* It's possible the company is deleted while the dropdown is open */
|
/* It's possible the company is deleted while the dropdown is open */
|
||||||
if (!Company::IsValidID(company)) return;
|
if (!Company::IsValidID(company)) return;
|
||||||
|
|
||||||
DrawCompanyIcon(company, rtl ? right - 16 : left + 2, top + 1 + (FONT_HEIGHT_NORMAL - 10) / 2);
|
DrawCompanyIcon(company, rtl ? right - 14 - WD_FRAMERECT_RIGHT : left + WD_FRAMERECT_LEFT, top + 1 + (FONT_HEIGHT_NORMAL - 10) / 2);
|
||||||
|
|
||||||
SetDParam(0, company);
|
SetDParam(0, company);
|
||||||
SetDParam(1, company);
|
SetDParam(1, company);
|
||||||
@ -177,7 +177,7 @@ public:
|
|||||||
} else {
|
} else {
|
||||||
col = sel ? TC_WHITE : TC_BLACK;
|
col = sel ? TC_WHITE : TC_BLACK;
|
||||||
}
|
}
|
||||||
DrawString(rtl ? left + 2 : left + 19, rtl ? right - 19 : right - 2, top, STR_COMPANY_NAME_COMPANY_NUM, col);
|
DrawString(left + WD_FRAMERECT_LEFT + (rtl ? 0 : 17), right - WD_FRAMERECT_RIGHT - (rtl ? 17 : 0), top, STR_COMPANY_NAME_COMPANY_NUM, col);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ uint DropDownListStringItem::Width() const
|
|||||||
|
|
||||||
void DropDownListStringItem::Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const
|
void DropDownListStringItem::Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const
|
||||||
{
|
{
|
||||||
DrawString(left + 2, right - 2, top, this->String(), sel ? TC_WHITE : TC_BLACK);
|
DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, this->String(), sel ? TC_WHITE : TC_BLACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
StringID DropDownListParamStringItem::String() const
|
StringID DropDownListParamStringItem::String() const
|
||||||
@ -53,7 +53,7 @@ uint DropDownListCharStringItem::Width() const
|
|||||||
|
|
||||||
void DropDownListCharStringItem::Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const
|
void DropDownListCharStringItem::Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const
|
||||||
{
|
{
|
||||||
DrawString(left + 2, right - 2, top, this->string, sel ? TC_WHITE : TC_BLACK);
|
DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, this->string, sel ? TC_WHITE : TC_BLACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user