mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-29 23:01:58 +00:00
GUI: RTL: Fix 1-off issue for drawing u32 strings
When RTL mode is on, previously it was fixed in a commit. This commit just reapplies that, for u32 string drawing.
This commit is contained in:
parent
4506bcd9f3
commit
521acaf459
@ -1114,8 +1114,17 @@ drawString(const Graphics::Font *font, const Common::U32String &text, const Comm
|
||||
drawArea = drawArea.findIntersectingRect(Common::Rect(0, 0, _activeSurface->w, _activeSurface->h));
|
||||
|
||||
if (!drawArea.isEmpty()) {
|
||||
Common::Rect textArea(area);
|
||||
textArea.right -= deltax;
|
||||
|
||||
Surface textAreaSurface = _activeSurface->getSubArea(drawArea);
|
||||
font->drawString(&textAreaSurface, text, area.left - drawArea.left, offset - drawArea.top, area.width() - deltax, _fgColor, alignH, deltax, ellipsis);
|
||||
|
||||
if (deltax >= 0) {
|
||||
textArea.left += deltax;
|
||||
deltax = 0;
|
||||
}
|
||||
|
||||
font->drawString(&textAreaSurface, text, textArea.left - drawArea.left, offset - drawArea.top, textArea.width(), _fgColor, alignH, deltax, ellipsis);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user