diff --git a/Content.Client/ClientNotifyManager.cs b/Content.Client/ClientNotifyManager.cs index cc7b31b747..847417aac5 100644 --- a/Content.Client/ClientNotifyManager.cs +++ b/Content.Client/ClientNotifyManager.cs @@ -24,7 +24,6 @@ namespace Content.Client { [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!; - [Dependency] private readonly IInputManager _inputManager = default!; [Dependency] private readonly IEyeManager _eyeManager = default!; [Dependency] private readonly IClientNetManager _netManager = default!; [Dependency] private readonly IEntityManager _entityManager = default!; @@ -106,13 +105,14 @@ namespace Content.Client _userInterfaceManager.PopupRoot.AddChild(label); var minimumSize = label.CombinedMinimumSize; - LayoutContainer.SetPosition(label, label.InitialPos = coordinates.Position - minimumSize / 2); + label.InitialPos = (coordinates.Position / _userInterfaceManager.UIScale) - minimumSize / 2; + LayoutContainer.SetPosition(label, label.InitialPos); _aliveLabels.Add(label); } public void PopupMessage(string message) { - PopupMessage(new ScreenCoordinates(_inputManager.MouseScreenPosition), message); + PopupMessage(new ScreenCoordinates(_userInterfaceManager.MousePositionScaled), message); } public void FrameUpdate(FrameEventArgs eventArgs) @@ -150,7 +150,7 @@ namespace Content.Client var position = Entity == null ? InitialPos - : _eyeManager.CoordinatesToScreen(Entity.Transform.Coordinates).Position - CombinedMinimumSize / 2; + : (_eyeManager.CoordinatesToScreen(Entity.Transform.Coordinates).Position / UIScale) - CombinedMinimumSize / 2; LayoutContainer.SetPosition(this, position - (0, 20 * (TimeLeft * TimeLeft + TimeLeft))); diff --git a/Content.Client/GameObjects/EntitySystems/DoAfter/DoAfterBar.cs b/Content.Client/GameObjects/EntitySystems/DoAfter/DoAfterBar.cs index c612670e5e..a53e39e510 100644 --- a/Content.Client/GameObjects/EntitySystems/DoAfter/DoAfterBar.cs +++ b/Content.Client/GameObjects/EntitySystems/DoAfter/DoAfterBar.cs @@ -117,7 +117,7 @@ namespace Content.Client.GameObjects.EntitySystems.DoAfter var box = new UIBox2i( leftOffset, -2 + 2 * DoAfterBarScale, - leftOffset + (int) (XPixelDiff * Ratio), + leftOffset + (int) (XPixelDiff * Ratio * UIScale), -2); handle.DrawRect(box, color); } diff --git a/Content.Client/GameObjects/EntitySystems/DoAfter/DoAfterGui.cs b/Content.Client/GameObjects/EntitySystems/DoAfter/DoAfterGui.cs index 23d865018e..d0ca66107b 100644 --- a/Content.Client/GameObjects/EntitySystems/DoAfter/DoAfterGui.cs +++ b/Content.Client/GameObjects/EntitySystems/DoAfter/DoAfterGui.cs @@ -150,7 +150,8 @@ namespace Content.Client.GameObjects.EntitySystems.DoAfter return; // Set position ready for 2nd+ frames. - _playerPosition = _eyeManager.CoordinatesToScreen(AttachedEntity.Transform.Coordinates); + var screenCoordinates = _eyeManager.CoordinatesToScreen(AttachedEntity.Transform.Coordinates); + _playerPosition = new ScreenCoordinates(screenCoordinates.X / UIScale, screenCoordinates.Y / UIScale); LayoutContainer.SetPosition(this, new Vector2(_playerPosition.X - Width / 2, _playerPosition.Y - Height - 30.0f)); if (FirstDraw)