FTL UIScale fixes (#26305)

- Fix text drawing being offset.
- Fix beacon snapping and distance check.
- Fix DrawData being offset.
- Fix bounds check for map objects not using PixelSize.
This commit is contained in:
metalgearsloth
2024-03-22 12:57:49 +11:00
committed by GitHub
parent 6a7c0594c9
commit 000a259563
2 changed files with 8 additions and 7 deletions

View File

@@ -66,11 +66,11 @@ public partial class BaseShuttleControl : MapGridControl
protected void DrawData(DrawingHandleScreen handle, string text)
{
var coordsDimensions = handle.GetDimensions(Font, text, UIScale);
var coordsDimensions = handle.GetDimensions(Font, text, 1f);
const float coordsMargins = 5f;
handle.DrawString(Font,
new Vector2(coordsMargins, Height) - new Vector2(0f, coordsDimensions.Y + coordsMargins),
new Vector2(coordsMargins, PixelHeight) - new Vector2(0f, coordsDimensions.Y + coordsMargins),
text,
Color.FromSrgb(IFFComponent.SelfColor));
}