Fix shuttle console UI scaling (#25807)

This commit is contained in:
metalgearsloth
2024-03-03 22:35:57 +11:00
committed by GitHub
parent 92872e546a
commit b7ccf73888
2 changed files with 3 additions and 3 deletions

View File

@@ -114,7 +114,7 @@ public sealed partial class ShuttleDockControl : BaseShuttleControl
offsetMatrix = offsetMatrix.Invert(); offsetMatrix = offsetMatrix.Invert();
// Draw nearby grids // Draw nearby grids
var controlBounds = SizeBox.Scale(1.25f); var controlBounds = PixelSizeBox;
_grids.Clear(); _grids.Clear();
_mapManager.FindGridsIntersecting(gridXform.MapID, new Box2(mapPos.Position - WorldRangeVector, mapPos.Position + WorldRangeVector), ref _grids); _mapManager.FindGridsIntersecting(gridXform.MapID, new Box2(mapPos.Position - WorldRangeVector, mapPos.Position + WorldRangeVector), ref _grids);
@@ -297,7 +297,7 @@ public sealed partial class ShuttleDockControl : BaseShuttleControl
{ {
// Because it's being layed out top-down we have to arrange for first frame. // Because it's being layed out top-down we have to arrange for first frame.
container.Arrange(PixelRect); container.Arrange(PixelRect);
var containerPos = scaledPos - container.DesiredSize / 2 - new Vector2(0f, 0.75f) * MinimapScale; var containerPos = scaledPos / UIScale - container.DesiredSize / 2 - new Vector2(0f, 0.75f) * MinimapScale;
SetPosition(container, containerPos); SetPosition(container, containerPos);
} }

View File

@@ -203,7 +203,7 @@ public partial class MapGridControl : LayoutContainer
protected void DrawBacking(DrawingHandleScreen handle) protected void DrawBacking(DrawingHandleScreen handle)
{ {
var backing = BackingColor; var backing = BackingColor;
handle.DrawRect(new UIBox2(0f, Height, Width, 0f), backing); handle.DrawRect(PixelSizeBox, backing);
} }
protected void DrawNoSignal(DrawingHandleScreen handle) protected void DrawNoSignal(DrawingHandleScreen handle)