From 9eec2268d86224f7e995f0de78713f20ef83228f Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Mon, 25 Jul 2022 18:58:23 +1000 Subject: [PATCH] Fix cursor popups (#10016) --- Content.Client/Popups/PopupSystem.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Content.Client/Popups/PopupSystem.cs b/Content.Client/Popups/PopupSystem.cs index aea17fec80..3841164bcb 100644 --- a/Content.Client/Popups/PopupSystem.cs +++ b/Content.Client/Popups/PopupSystem.cs @@ -157,7 +157,8 @@ namespace Content.Client.Popups public override void FrameUpdate(float frameTime) { - if (_aliveWorldLabels.Count == 0) return; + if (_aliveWorldLabels.Count == 0 && _aliveCursorLabels.Count == 0) + return; var player = _playerManager.LocalPlayer?.ControlledEntity; var playerPos = player != null ? Transform(player.Value).MapPosition : MapCoordinates.Nullspace; @@ -234,13 +235,13 @@ namespace Content.Client.Popups public CursorPopupLabel(ScreenCoordinates screenCoords) : base() { - InitialPos = screenCoords.Position / UIScale - DesiredSize / 2; + InitialPos = screenCoords.Position - DesiredSize / 2; } protected override void FrameUpdate(FrameEventArgs eventArgs) { base.FrameUpdate(eventArgs); - LayoutContainer.SetPosition(this, InitialPos - (0, 20 * (TotalTime * TotalTime + TotalTime))); + LayoutContainer.SetPosition(this, InitialPos / UIScale - (0, 20 * (TotalTime * TotalTime + TotalTime))); } }