From b7ccf738883b486364b10b272ce4c9fef3ad6261 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sun, 3 Mar 2024 22:35:57 +1100 Subject: [PATCH] Fix shuttle console UI scaling (#25807) --- Content.Client/Shuttles/UI/ShuttleDockControl.xaml.cs | 4 ++-- Content.Client/UserInterface/Controls/MapGridControl.xaml.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Client/Shuttles/UI/ShuttleDockControl.xaml.cs b/Content.Client/Shuttles/UI/ShuttleDockControl.xaml.cs index 961ec35cdb..f03c440295 100644 --- a/Content.Client/Shuttles/UI/ShuttleDockControl.xaml.cs +++ b/Content.Client/Shuttles/UI/ShuttleDockControl.xaml.cs @@ -114,7 +114,7 @@ public sealed partial class ShuttleDockControl : BaseShuttleControl offsetMatrix = offsetMatrix.Invert(); // Draw nearby grids - var controlBounds = SizeBox.Scale(1.25f); + var controlBounds = PixelSizeBox; _grids.Clear(); _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. 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); } diff --git a/Content.Client/UserInterface/Controls/MapGridControl.xaml.cs b/Content.Client/UserInterface/Controls/MapGridControl.xaml.cs index adefd3c1ae..f6b0929f3b 100644 --- a/Content.Client/UserInterface/Controls/MapGridControl.xaml.cs +++ b/Content.Client/UserInterface/Controls/MapGridControl.xaml.cs @@ -203,7 +203,7 @@ public partial class MapGridControl : LayoutContainer protected void DrawBacking(DrawingHandleScreen handle) { var backing = BackingColor; - handle.DrawRect(new UIBox2(0f, Height, Width, 0f), backing); + handle.DrawRect(PixelSizeBox, backing); } protected void DrawNoSignal(DrawingHandleScreen handle)