mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-24 12:06:41 +00:00
Codechange: Replace Alignment enum with struct
Alignment struct contains separate horizontal and vertical alignment members.
This commit is contained in:
committed by
Peter Nelson
parent
8e637cefed
commit
b4d16d319f
@@ -582,9 +582,9 @@ void TextfileWindow::AfterLoadMarkdown()
|
||||
int y_offset = (top - pos) * line_height;
|
||||
if (line.wrapped_width != 0) {
|
||||
Rect tr = fr.WithWidth(line.wrapped_width, _current_text_dir == TD_RTL);
|
||||
DrawStringMultiLineWithClipping(tr.left, tr.right, y_offset, y_offset + line.num_lines * line_height, line.text, line.colour, SA_TOP | SA_LEFT, false, FontSize::Monospace);
|
||||
DrawStringMultiLineWithClipping(tr.left, tr.right, y_offset, y_offset + line.num_lines * line_height, line.text, line.colour, {AlignmentH::Start, AlignmentV::Top}, false, FontSize::Monospace);
|
||||
} else {
|
||||
DrawString(fr.left, fr.right, y_offset, line.text, line.colour, SA_TOP | SA_LEFT, false, FontSize::Monospace);
|
||||
DrawString(fr.left, fr.right, y_offset, line.text, line.colour, {AlignmentH::Start, AlignmentV::Top}, false, FontSize::Monospace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user