Use MousePositionScaled instead of absolute MousePosition to fix UI-scaling issues (#2568)

* Use MousePositionScaled instead of absolute MousePosition to fix UI-scaling issues

* Fix compiler warnings
This commit is contained in:
R. Neuser
2020-12-04 08:24:22 -06:00
committed by GitHub
parent 0ed1191623
commit c4c4a1ca8c
2 changed files with 3 additions and 4 deletions

View File

@@ -25,7 +25,6 @@ namespace Content.Client.GameObjects.EntitySystems
[UsedImplicitly]
internal sealed class ExamineSystem : ExamineSystemShared
{
[Dependency] private readonly IInputManager _inputManager = default!;
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
@@ -72,7 +71,7 @@ namespace Content.Client.GameObjects.EntitySystems
const float minWidth = 300;
CloseTooltip();
var popupPos = _inputManager.MouseScreenPosition;
var popupPos = _userInterfaceManager.MousePositionScaled;
// Actually open the tooltip.
_examineTooltipOpen = new Popup();