1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 18:39:10 +00:00

Codechange: Simplify calling of DrawCharCentered()

This commit is contained in:
2021-04-22 01:17:30 +01:00
committed by PeterN
parent 4f93dd95e4
commit 2efa390a7d
3 changed files with 8 additions and 9 deletions

View File

@@ -103,10 +103,7 @@ struct OskWindow : public Window {
if (widget < WID_OSK_LETTERS) return;
widget -= WID_OSK_LETTERS;
DrawCharCentered(_keyboard[this->shift][widget],
r.left + (r.right - r.left) / 2,
r.top + (r.bottom - r.top - FONT_HEIGHT_NORMAL) / 2,
TC_BLACK);
DrawCharCentered(_keyboard[this->shift][widget], r, TC_BLACK);
}
void OnClick(Point pt, int widget, int click_count) override