Merge pull request #1039 from slavidodo/master

Correcting text offset
This commit is contained in:
Konrad Kuśnierz 2019-10-10 08:14:47 +02:00 committed by GitHub
commit 1ab18788e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,9 @@ void UIWidget::drawText(const Rect& screenCoords)
return;
if(screenCoords != m_textCachedScreenCoords || m_textMustRecache) {
Rect coords = Rect(screenCoords.topLeft() + m_textOffset, screenCoords.bottomRight());
Rect coords = Rect(screenCoords.topLeft(), screenCoords.bottomRight());
coords.translate(m_textOffset);
m_textMustRecache = false;
m_textCachedScreenCoords = coords;