(5154265e6) Don't round ItemLabel text positions to the nearest pixel (causes weird looking "jitter" when the sub moves)
This commit is contained in:
@@ -26,6 +26,8 @@ namespace Barotrauma
|
||||
|
||||
public bool Wrap;
|
||||
|
||||
public bool RoundToNearestPixel = true;
|
||||
|
||||
private bool overflowClipActive;
|
||||
public bool OverflowClip;
|
||||
|
||||
@@ -329,8 +331,11 @@ namespace Barotrauma
|
||||
if (!string.IsNullOrEmpty(text))
|
||||
{
|
||||
Vector2 pos = rect.Location.ToVector2() + textPos + TextOffset;
|
||||
pos.X = (int)pos.X;
|
||||
pos.Y = (int)pos.Y;
|
||||
if (RoundToNearestPixel)
|
||||
{
|
||||
pos.X = (int)pos.X;
|
||||
pos.Y = (int)pos.Y;
|
||||
}
|
||||
|
||||
Font.DrawString(spriteBatch,
|
||||
Wrap ? wrappedText : text,
|
||||
|
||||
Reference in New Issue
Block a user