Correcting text offset

This commit is contained in:
Nickolas Coppem 2019-07-06 19:41:39 +02:00 committed by GitHub
parent caae18dbce
commit 17738dfdea
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;