mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Fix #6584: text layout problem in engine preview dialog
With language set to German, there was a problem in this dialog box due to the long strings in this language. It looks like the call to `GetStringHeight()` here is using `r.top` to help calculate the max width, rather than `r.left`.
This commit is contained in:
parent
b22fbfbe3d
commit
6a56a4ce84
@ -108,7 +108,7 @@ struct EnginePreviewWindow : Window {
|
||||
|
||||
EngineID engine = this->window_number;
|
||||
SetDParam(0, GetEngineCategoryName(engine));
|
||||
int y = r.top + GetStringHeight(STR_ENGINE_PREVIEW_MESSAGE, r.right - r.top + 1);
|
||||
int y = r.top + GetStringHeight(STR_ENGINE_PREVIEW_MESSAGE, r.right - r.left + 1);
|
||||
y = DrawStringMultiLine(r.left, r.right, r.top, y, STR_ENGINE_PREVIEW_MESSAGE, TC_FROMSTRING, SA_CENTER) + WD_PAR_VSEP_WIDE;
|
||||
|
||||
SetDParam(0, engine);
|
||||
|
Loading…
Reference in New Issue
Block a user