Merge pull request #539 from pjft/fix-jagged-font

Fix jagged font in games list
This commit is contained in:
Jools Wills 2019-03-04 16:16:57 +00:00 committed by GitHub
commit 6bdf31a486
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -200,7 +200,7 @@ void TextListComponent<T>::render(const Transform4x4f& parentTrans)
offset[0] = mHorizontalMargin; offset[0] = mHorizontalMargin;
break; break;
case ALIGN_CENTER: case ALIGN_CENTER:
offset[0] = (mSize.x() - entry.data.textCache->metrics.size.x()) / 2; offset[0] = (int)((mSize.x() - entry.data.textCache->metrics.size.x()) / 2);
if(offset[0] < mHorizontalMargin) if(offset[0] < mHorizontalMargin)
offset[0] = mHorizontalMargin; offset[0] = mHorizontalMargin;
break; break;