(d9894f840) Round UI text positions to integers, rendering at a fractional position makes them look messy

This commit is contained in:
Joonas Rikkonen
2019-05-18 17:20:25 +03:00
parent 1e00493502
commit 09ddcc8436
4 changed files with 7 additions and 2 deletions
@@ -790,6 +790,7 @@ namespace Barotrauma
for (int i = legalCrap.Length - 1; i >= 0; i--)
{
Vector2 textSize = GUI.SmallFont.MeasureString(legalCrap[i]);
textSize = new Vector2((int)textSize.X, (int)textSize.Y);
bool mouseOn = i == 0 &&
PlayerInput.MousePosition.X > textPos.X - textSize.X && PlayerInput.MousePosition.X < textPos.X &&
PlayerInput.MousePosition.Y > textPos.Y - textSize.Y && PlayerInput.MousePosition.Y < textPos.Y;